/* * Copyright 2010-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 com.amazonaws.AmazonWebServiceRequest; /** *
* Creates or updates a custom terminology, depending on whether one already * exists for the given terminology name. Importing a terminology with the same * name as an existing one will merge the terminologies based on the chosen * merge strategy. The only supported merge strategy is OVERWRITE, where the * imported terminology overwrites the existing terminology of the same name. *
** If you import a terminology that overwrites an existing one, the new * terminology takes up to 10 minutes to fully propagate. After that, * translations have access to the new terminology. *
*/ public class ImportTerminologyRequest extends AmazonWebServiceRequest implements Serializable { /** ** The name of the custom terminology being imported. *
*
* Constraints:
* Length: 1 - 256
* Pattern: ^([A-Za-z0-9-]_?)+$
*/
private String name;
/**
*
* The merge strategy of the custom terminology being imported. Currently, * only the OVERWRITE merge strategy is supported. In this case, the * imported terminology will overwrite an existing terminology of the same * name. *
*
* Constraints:
* Allowed Values: OVERWRITE
*/
private String mergeStrategy;
/**
*
* The description of the custom terminology being imported. *
*
* Constraints:
* Length: - 256
* Pattern: [\P{M}\p{M}]{0,256}
*/
private String description;
/**
*
* The terminology data for the custom terminology being imported. *
*/ private TerminologyData terminologyData; /** ** The encryption key for the custom terminology being imported. *
*/ private EncryptionKey encryptionKey; /** ** Tags to be associated with this resource. A tag is a key-value pair that * adds metadata to a resource. Each tag key for the resource must be * unique. For more information, see * Tagging your resources. *
*/ private java.util.List* The name of the custom terminology being imported. *
*
* Constraints:
* Length: 1 - 256
* Pattern: ^([A-Za-z0-9-]_?)+$
*
* @return
* The name of the custom terminology being imported. *
*/ public String getName() { return name; } /** ** The name of the custom terminology being imported. *
*
* Constraints:
* Length: 1 - 256
* Pattern: ^([A-Za-z0-9-]_?)+$
*
* @param name
* The name of the custom terminology being imported. *
*/ public void setName(String name) { this.name = name; } /** ** The name of the custom terminology being imported. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 256
* Pattern: ^([A-Za-z0-9-]_?)+$
*
* @param name
* The name of the custom terminology being imported. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ImportTerminologyRequest withName(String name) { this.name = name; return this; } /** ** The merge strategy of the custom terminology being imported. Currently, * only the OVERWRITE merge strategy is supported. In this case, the * imported terminology will overwrite an existing terminology of the same * name. *
*
* Constraints:
* Allowed Values: OVERWRITE
*
* @return
* The merge strategy of the custom terminology being imported. * Currently, only the OVERWRITE merge strategy is supported. In * this case, the imported terminology will overwrite an existing * terminology of the same name. *
* @see MergeStrategy */ public String getMergeStrategy() { return mergeStrategy; } /** ** The merge strategy of the custom terminology being imported. Currently, * only the OVERWRITE merge strategy is supported. In this case, the * imported terminology will overwrite an existing terminology of the same * name. *
*
* Constraints:
* Allowed Values: OVERWRITE
*
* @param mergeStrategy
* The merge strategy of the custom terminology being imported. * Currently, only the OVERWRITE merge strategy is supported. In * this case, the imported terminology will overwrite an existing * terminology of the same name. *
* @see MergeStrategy */ public void setMergeStrategy(String mergeStrategy) { this.mergeStrategy = mergeStrategy; } /** ** The merge strategy of the custom terminology being imported. Currently, * only the OVERWRITE merge strategy is supported. In this case, the * imported terminology will overwrite an existing terminology of the same * name. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: OVERWRITE
*
* @param mergeStrategy
* The merge strategy of the custom terminology being imported. * Currently, only the OVERWRITE merge strategy is supported. In * this case, the imported terminology will overwrite an existing * terminology of the same name. *
* @return A reference to this updated object so that method calls can be * chained together. * @see MergeStrategy */ public ImportTerminologyRequest withMergeStrategy(String mergeStrategy) { this.mergeStrategy = mergeStrategy; return this; } /** ** The merge strategy of the custom terminology being imported. Currently, * only the OVERWRITE merge strategy is supported. In this case, the * imported terminology will overwrite an existing terminology of the same * name. *
*
* Constraints:
* Allowed Values: OVERWRITE
*
* @param mergeStrategy
* The merge strategy of the custom terminology being imported. * Currently, only the OVERWRITE merge strategy is supported. In * this case, the imported terminology will overwrite an existing * terminology of the same name. *
* @see MergeStrategy */ public void setMergeStrategy(MergeStrategy mergeStrategy) { this.mergeStrategy = mergeStrategy.toString(); } /** ** The merge strategy of the custom terminology being imported. Currently, * only the OVERWRITE merge strategy is supported. In this case, the * imported terminology will overwrite an existing terminology of the same * name. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: OVERWRITE
*
* @param mergeStrategy
* The merge strategy of the custom terminology being imported. * Currently, only the OVERWRITE merge strategy is supported. In * this case, the imported terminology will overwrite an existing * terminology of the same name. *
* @return A reference to this updated object so that method calls can be * chained together. * @see MergeStrategy */ public ImportTerminologyRequest withMergeStrategy(MergeStrategy mergeStrategy) { this.mergeStrategy = mergeStrategy.toString(); return this; } /** ** The description of the custom terminology being imported. *
*
* Constraints:
* Length: - 256
* Pattern: [\P{M}\p{M}]{0,256}
*
* @return
* The description of the custom terminology being imported. *
*/ public String getDescription() { return description; } /** ** The description of the custom terminology being imported. *
*
* Constraints:
* Length: - 256
* Pattern: [\P{M}\p{M}]{0,256}
*
* @param description
* The description of the custom terminology being imported. *
*/ public void setDescription(String description) { this.description = description; } /** ** The description of the custom terminology being imported. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 256
* Pattern: [\P{M}\p{M}]{0,256}
*
* @param description
* The description of the custom terminology being imported. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ImportTerminologyRequest withDescription(String description) { this.description = description; return this; } /** ** The terminology data for the custom terminology being imported. *
* * @return* The terminology data for the custom terminology being imported. *
*/ public TerminologyData getTerminologyData() { return terminologyData; } /** ** The terminology data for the custom terminology being imported. *
* * @param terminologyData* The terminology data for the custom terminology being * imported. *
*/ public void setTerminologyData(TerminologyData terminologyData) { this.terminologyData = terminologyData; } /** ** The terminology data for the custom terminology being imported. *
** Returns a reference to this object so that method calls can be chained * together. * * @param terminologyData
* The terminology data for the custom terminology being * imported. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ImportTerminologyRequest withTerminologyData(TerminologyData terminologyData) { this.terminologyData = terminologyData; return this; } /** ** The encryption key for the custom terminology being imported. *
* * @return* The encryption key for the custom terminology being imported. *
*/ public EncryptionKey getEncryptionKey() { return encryptionKey; } /** ** The encryption key for the custom terminology being imported. *
* * @param encryptionKey* The encryption key for the custom terminology being imported. *
*/ public void setEncryptionKey(EncryptionKey encryptionKey) { this.encryptionKey = encryptionKey; } /** ** The encryption key for the custom terminology being imported. *
** Returns a reference to this object so that method calls can be chained * together. * * @param encryptionKey
* The encryption key for the custom terminology being imported. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ImportTerminologyRequest withEncryptionKey(EncryptionKey encryptionKey) { this.encryptionKey = encryptionKey; return this; } /** ** Tags to be associated with this resource. A tag is a key-value pair that * adds metadata to a resource. Each tag key for the resource must be * unique. For more information, see * Tagging your resources. *
* * @return* Tags to be associated with this resource. A tag is a key-value * pair that adds metadata to a resource. Each tag key for the * resource must be unique. For more information, see * Tagging your resources. *
*/ public java.util.List* Tags to be associated with this resource. A tag is a key-value pair that * adds metadata to a resource. Each tag key for the resource must be * unique. For more information, see * Tagging your resources. *
* * @param tags* Tags to be associated with this resource. A tag is a key-value * pair that adds metadata to a resource. Each tag key for the * resource must be unique. For more information, see Tagging your resources. *
*/ public void setTags(java.util.Collection* Tags to be associated with this resource. A tag is a key-value pair that * adds metadata to a resource. Each tag key for the resource must be * unique. For more information, see * Tagging your resources. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tags
* Tags to be associated with this resource. A tag is a key-value * pair that adds metadata to a resource. Each tag key for the * resource must be unique. For more information, see Tagging your resources. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ImportTerminologyRequest withTags(Tag... tags) { if (getTags() == null) { this.tags = new java.util.ArrayList* Tags to be associated with this resource. A tag is a key-value pair that * adds metadata to a resource. Each tag key for the resource must be * unique. For more information, see * Tagging your resources. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tags
* Tags to be associated with this resource. A tag is a key-value * pair that adds metadata to a resource. Each tag key for the * resource must be unique. For more information, see Tagging your resources. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ImportTerminologyRequest withTags(java.util.Collection