/* * 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 StartTextTranslationJobRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the batch translation job to be performed. *
*/ private String jobName; /** ** Specifies the format and location of the input documents for the translation job. *
*/ private InputDataConfig inputDataConfig; /** ** Specifies the S3 folder to which your job output will be saved. *
*/ private OutputDataConfig outputDataConfig; /** ** The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon Translate * read access to your input data. For more information, see Identity and access * management . *
*/ private String dataAccessRoleArn; /** *
* The language code of the input language. Specify the language if all input documents share the same language. If
* you don't know the language of the source files, or your input documents contains different source languages,
* select auto
. Amazon Translate auto detects the source language for each input document. For a list
* of supported language codes, see Supported languages.
*
* The target languages of the translation job. Enter up to 10 language codes. Each input file is translated into * each target language. *
** Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages. *
*/ private java.util.List* The name of a custom terminology resource to add to the translation job. This resource lists examples source * terms and the desired translation for each term. *
** This parameter accepts only one custom terminology resource. *
** If you specify multiple target languages for the job, translate uses the designated terminology for each * requested target language that has an entry for the source term in the terminology file. *
** For a list of available custom terminology resources, use the ListTerminologies operation. *
** For more information, see Custom terminology. *
*/ private java.util.List* The name of a parallel data resource to add to the translation job. This resource consists of examples that show * how you want segments of text to be translated. If you specify multiple target languages for the job, the * parallel data file must include translations for all the target languages. *
** When you add parallel data to a translation job, you create an Active Custom Translation job. *
** This parameter accepts only one parallel data resource. *
** Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. For more * information, see Amazon Translate pricing. *
** For a list of available parallel data resources, use the ListParallelData operation. *
** For more information, see Customizing * your translations with parallel data. *
*/ private java.util.List* A unique identifier for the request. This token is generated for you when using the Amazon Translate SDK. *
*/ private String clientToken; /** ** 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. *
*/ private TranslationSettings settings; /** ** The name of the batch translation job to be performed. *
* * @param jobName * The name of the batch translation job to be performed. */ public void setJobName(String jobName) { this.jobName = jobName; } /** ** The name of the batch translation job to be performed. *
* * @return The name of the batch translation job to be performed. */ public String getJobName() { return this.jobName; } /** ** The name of the batch translation job to be performed. *
* * @param jobName * The name of the batch translation job to be performed. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTextTranslationJobRequest withJobName(String jobName) { setJobName(jobName); return this; } /** ** Specifies the format and location of the input documents for the translation job. *
* * @param inputDataConfig * Specifies the format and location of the input documents for the translation job. */ public void setInputDataConfig(InputDataConfig inputDataConfig) { this.inputDataConfig = inputDataConfig; } /** ** Specifies the format and location of the input documents for the translation job. *
* * @return Specifies the format and location of the input documents for the translation job. */ public InputDataConfig getInputDataConfig() { return this.inputDataConfig; } /** ** Specifies the format and location of the input documents for the translation job. *
* * @param inputDataConfig * Specifies the format and location of the input documents for the translation job. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTextTranslationJobRequest withInputDataConfig(InputDataConfig inputDataConfig) { setInputDataConfig(inputDataConfig); return this; } /** ** Specifies the S3 folder to which your job output will be saved. *
* * @param outputDataConfig * Specifies the S3 folder to which your job output will be saved. */ public void setOutputDataConfig(OutputDataConfig outputDataConfig) { this.outputDataConfig = outputDataConfig; } /** ** Specifies the S3 folder to which your job output will be saved. *
* * @return Specifies the S3 folder to which your job output will be saved. */ public OutputDataConfig getOutputDataConfig() { return this.outputDataConfig; } /** ** Specifies the S3 folder to which your job output will be saved. *
* * @param outputDataConfig * Specifies the S3 folder to which your job output will be saved. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTextTranslationJobRequest withOutputDataConfig(OutputDataConfig outputDataConfig) { setOutputDataConfig(outputDataConfig); return this; } /** ** The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon Translate * read access to your input data. For more information, see Identity and access * management . *
* * @param dataAccessRoleArn * The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon * Translate read access to your input data. For more information, see Identity and * access management . */ public void setDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon Translate * read access to your input data. For more information, see Identity and access * management . *
* * @return The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon * Translate read access to your input data. For more information, see Identity and * access management . */ public String getDataAccessRoleArn() { return this.dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon Translate * read access to your input data. For more information, see Identity and access * management . *
* * @param dataAccessRoleArn * The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon * Translate read access to your input data. For more information, see Identity and * access management . * @return Returns a reference to this object so that method calls can be chained together. */ public StartTextTranslationJobRequest withDataAccessRoleArn(String dataAccessRoleArn) { setDataAccessRoleArn(dataAccessRoleArn); return this; } /** *
* The language code of the input language. Specify the language if all input documents share the same language. If
* you don't know the language of the source files, or your input documents contains different source languages,
* select auto
. Amazon Translate auto detects the source language for each input document. For a list
* of supported language codes, see Supported languages.
*
auto
. Amazon Translate auto detects the source language for each
* input document. For a list of supported language codes, see Supported languages.
*/
public void setSourceLanguageCode(String sourceLanguageCode) {
this.sourceLanguageCode = sourceLanguageCode;
}
/**
*
* The language code of the input language. Specify the language if all input documents share the same language. If
* you don't know the language of the source files, or your input documents contains different source languages,
* select auto
. Amazon Translate auto detects the source language for each input document. For a list
* of supported language codes, see Supported languages.
*
auto
. Amazon Translate auto detects the source language for each
* input document. For a list of supported language codes, see Supported languages.
*/
public String getSourceLanguageCode() {
return this.sourceLanguageCode;
}
/**
*
* The language code of the input language. Specify the language if all input documents share the same language. If
* you don't know the language of the source files, or your input documents contains different source languages,
* select auto
. Amazon Translate auto detects the source language for each input document. For a list
* of supported language codes, see Supported languages.
*
auto
. Amazon Translate auto detects the source language for each
* input document. 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 StartTextTranslationJobRequest withSourceLanguageCode(String sourceLanguageCode) {
setSourceLanguageCode(sourceLanguageCode);
return this;
}
/**
* * The target languages of the translation job. Enter up to 10 language codes. Each input file is translated into * each target language. *
** Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages. *
* * @return The target languages of the translation job. Enter up to 10 language codes. Each input file is translated * into each target language. *
* Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages.
*/
public java.util.List
* The target languages of the translation job. Enter up to 10 language codes. Each input file is translated into
* each target language.
*
* Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages.
*
* Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages.
*/
public void setTargetLanguageCodes(java.util.Collection
* The target languages of the translation job. Enter up to 10 language codes. Each input file is translated into
* each target language.
*
* Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTargetLanguageCodes(java.util.Collection)} or {@link #withTargetLanguageCodes(java.util.Collection)}
* if you want to override the existing values.
*
* Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTextTranslationJobRequest withTargetLanguageCodes(String... targetLanguageCodes) {
if (this.targetLanguageCodes == null) {
setTargetLanguageCodes(new java.util.ArrayList
* The target languages of the translation job. Enter up to 10 language codes. Each input file is translated into
* each target language.
*
* Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages.
*
* Each language code is 2 or 5 characters long. For a list of language codes, see Supported languages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTextTranslationJobRequest withTargetLanguageCodes(java.util.Collection
* The name of a custom terminology resource to add to the translation job. This resource lists examples source
* terms and the desired translation for each term.
*
* This parameter accepts only one custom terminology resource.
*
* If you specify multiple target languages for the job, translate uses the designated terminology for each
* requested target language that has an entry for the source term in the terminology file.
*
* For a list of available custom terminology resources, use the ListTerminologies operation.
*
* For more information, see Custom terminology.
*
* This parameter accepts only one custom terminology resource. *
** If you specify multiple target languages for the job, translate uses the designated terminology for each * requested target language that has an entry for the source term in the terminology file. *
** For a list of available custom terminology resources, use the ListTerminologies operation. *
*
* For more information, see Custom
* terminology.
*/
public java.util.List
* The name of a custom terminology resource to add to the translation job. This resource lists examples source
* terms and the desired translation for each term.
*
* This parameter accepts only one custom terminology resource.
*
* If you specify multiple target languages for the job, translate uses the designated terminology for each
* requested target language that has an entry for the source term in the terminology file.
*
* For a list of available custom terminology resources, use the ListTerminologies operation.
*
* For more information, see Custom terminology.
*
* This parameter accepts only one custom terminology resource. *
** If you specify multiple target languages for the job, translate uses the designated terminology for each * requested target language that has an entry for the source term in the terminology file. *
** For a list of available custom terminology resources, use the ListTerminologies operation. *
*
* For more information, see Custom terminology.
*/
public void setTerminologyNames(java.util.Collection
* The name of a custom terminology resource to add to the translation job. This resource lists examples source
* terms and the desired translation for each term.
*
* This parameter accepts only one custom terminology resource.
*
* If you specify multiple target languages for the job, translate uses the designated terminology for each
* requested target language that has an entry for the source term in the terminology file.
*
* For a list of available custom terminology resources, use the ListTerminologies operation.
*
* For more information, 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.
*
* This parameter accepts only one custom terminology resource. *
** If you specify multiple target languages for the job, translate uses the designated terminology for each * requested target language that has an entry for the source term in the terminology file. *
** For a list of available custom terminology resources, use the ListTerminologies operation. *
*
* For more information, see Custom terminology.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTextTranslationJobRequest withTerminologyNames(String... terminologyNames) {
if (this.terminologyNames == null) {
setTerminologyNames(new java.util.ArrayList
* The name of a custom terminology resource to add to the translation job. This resource lists examples source
* terms and the desired translation for each term.
*
* This parameter accepts only one custom terminology resource.
*
* If you specify multiple target languages for the job, translate uses the designated terminology for each
* requested target language that has an entry for the source term in the terminology file.
*
* For a list of available custom terminology resources, use the ListTerminologies operation.
*
* For more information, see Custom terminology.
*
* This parameter accepts only one custom terminology resource. *
** If you specify multiple target languages for the job, translate uses the designated terminology for each * requested target language that has an entry for the source term in the terminology file. *
** For a list of available custom terminology resources, use the ListTerminologies operation. *
*
* For more information, see Custom terminology.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTextTranslationJobRequest withTerminologyNames(java.util.Collection
* The name of a parallel data resource to add to the translation job. This resource consists of examples that show
* how you want segments of text to be translated. If you specify multiple target languages for the job, the
* parallel data file must include translations for all the target languages.
*
* When you add parallel data to a translation job, you create an Active Custom Translation job.
*
* This parameter accepts only one parallel data resource.
*
* Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. For more
* information, see Amazon Translate pricing.
*
* For a list of available parallel data resources, use the ListParallelData operation.
*
* For more information, see Customizing
* your translations with parallel data.
*
* When you add parallel data to a translation job, you create an Active Custom Translation job. *
** This parameter accepts only one parallel data resource. *
** Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. * For more information, see Amazon Translate * pricing. *
** For a list of available parallel data resources, use the ListParallelData operation. *
*
* For more information, see
* Customizing your translations with parallel data.
*/
public java.util.List
* The name of a parallel data resource to add to the translation job. This resource consists of examples that show
* how you want segments of text to be translated. If you specify multiple target languages for the job, the
* parallel data file must include translations for all the target languages.
*
* When you add parallel data to a translation job, you create an Active Custom Translation job.
*
* This parameter accepts only one parallel data resource.
*
* Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. For more
* information, see Amazon Translate pricing.
*
* For a list of available parallel data resources, use the ListParallelData operation.
*
* For more information, see Customizing
* your translations with parallel data.
*
* When you add parallel data to a translation job, you create an Active Custom Translation job. *
** This parameter accepts only one parallel data resource. *
** Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. * For more information, see Amazon Translate pricing. *
** For a list of available parallel data resources, use the ListParallelData operation. *
*
* For more information, see
* Customizing your translations with parallel data.
*/
public void setParallelDataNames(java.util.Collection
* The name of a parallel data resource to add to the translation job. This resource consists of examples that show
* how you want segments of text to be translated. If you specify multiple target languages for the job, the
* parallel data file must include translations for all the target languages.
*
* When you add parallel data to a translation job, you create an Active Custom Translation job.
*
* This parameter accepts only one parallel data resource.
*
* Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. For more
* information, see Amazon Translate pricing.
*
* For a list of available parallel data resources, use the ListParallelData operation.
*
* For more information, see Customizing
* your translations with parallel data.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setParallelDataNames(java.util.Collection)} or {@link #withParallelDataNames(java.util.Collection)} if
* you want to override the existing values.
*
* When you add parallel data to a translation job, you create an Active Custom Translation job. *
** This parameter accepts only one parallel data resource. *
** Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. * For more information, see Amazon Translate pricing. *
** For a list of available parallel data resources, use the ListParallelData operation. *
*
* For more information, see
* Customizing your translations with parallel data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTextTranslationJobRequest withParallelDataNames(String... parallelDataNames) {
if (this.parallelDataNames == null) {
setParallelDataNames(new java.util.ArrayList
* The name of a parallel data resource to add to the translation job. This resource consists of examples that show
* how you want segments of text to be translated. If you specify multiple target languages for the job, the
* parallel data file must include translations for all the target languages.
*
* When you add parallel data to a translation job, you create an Active Custom Translation job.
*
* This parameter accepts only one parallel data resource.
*
* Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. For more
* information, see Amazon Translate pricing.
*
* For a list of available parallel data resources, use the ListParallelData operation.
*
* For more information, see Customizing
* your translations with parallel data.
*
* When you add parallel data to a translation job, you create an Active Custom Translation job. *
** This parameter accepts only one parallel data resource. *
** Active Custom Translation jobs are priced at a higher rate than other jobs that don't use parallel data. * For more information, see Amazon Translate pricing. *
** For a list of available parallel data resources, use the ListParallelData operation. *
*
* For more information, see
* Customizing your translations with parallel data.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartTextTranslationJobRequest withParallelDataNames(java.util.Collection
* A unique identifier for the request. This token is generated for you when using the Amazon Translate SDK.
*
* A unique identifier for the request. This token is generated for you when using the Amazon Translate SDK.
*
* A unique identifier for the request. This token is generated for you when using the Amazon Translate SDK.
*
* 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 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 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.
*