/* * 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.comprehend.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 ImportModelRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The Amazon Resource Name (ARN) of the custom model to import. *
*/ private String sourceModelArn; /** ** The name to assign to the custom model that is created in Amazon Comprehend by this import. *
*/ private String modelName; /** ** The version name given to the custom model that is created by this import. Version names can have a maximum of * 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be * unique among all models with the same classifier name in the account/Region. *
*/ private String versionName; /** ** ID for the KMS key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either * of the following formats: *
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to use Amazon Key * Management Service (KMS) to encrypt or decrypt the custom model. *
*/ private String dataAccessRoleArn; /** ** Tags to associate with the custom model that is created by this import. A tag is a key-value pair that adds as a * metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a * resource to indicate its use by the sales department. *
*/ private java.util.List* The Amazon Resource Name (ARN) of the custom model to import. *
* * @param sourceModelArn * The Amazon Resource Name (ARN) of the custom model to import. */ public void setSourceModelArn(String sourceModelArn) { this.sourceModelArn = sourceModelArn; } /** ** The Amazon Resource Name (ARN) of the custom model to import. *
* * @return The Amazon Resource Name (ARN) of the custom model to import. */ public String getSourceModelArn() { return this.sourceModelArn; } /** ** The Amazon Resource Name (ARN) of the custom model to import. *
* * @param sourceModelArn * The Amazon Resource Name (ARN) of the custom model to import. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportModelRequest withSourceModelArn(String sourceModelArn) { setSourceModelArn(sourceModelArn); return this; } /** ** The name to assign to the custom model that is created in Amazon Comprehend by this import. *
* * @param modelName * The name to assign to the custom model that is created in Amazon Comprehend by this import. */ public void setModelName(String modelName) { this.modelName = modelName; } /** ** The name to assign to the custom model that is created in Amazon Comprehend by this import. *
* * @return The name to assign to the custom model that is created in Amazon Comprehend by this import. */ public String getModelName() { return this.modelName; } /** ** The name to assign to the custom model that is created in Amazon Comprehend by this import. *
* * @param modelName * The name to assign to the custom model that is created in Amazon Comprehend by this import. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportModelRequest withModelName(String modelName) { setModelName(modelName); return this; } /** ** The version name given to the custom model that is created by this import. Version names can have a maximum of * 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be * unique among all models with the same classifier name in the account/Region. *
* * @param versionName * The version name given to the custom model that is created by this import. Version names can have a * maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The * version name must be unique among all models with the same classifier name in the account/Region. */ public void setVersionName(String versionName) { this.versionName = versionName; } /** ** The version name given to the custom model that is created by this import. Version names can have a maximum of * 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be * unique among all models with the same classifier name in the account/Region. *
* * @return The version name given to the custom model that is created by this import. Version names can have a * maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The * version name must be unique among all models with the same classifier name in the account/Region. */ public String getVersionName() { return this.versionName; } /** ** The version name given to the custom model that is created by this import. Version names can have a maximum of * 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The version name must be * unique among all models with the same classifier name in the account/Region. *
* * @param versionName * The version name given to the custom model that is created by this import. Version names can have a * maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The * version name must be unique among all models with the same classifier name in the account/Region. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportModelRequest withVersionName(String versionName) { setVersionName(versionName); return this; } /** ** ID for the KMS key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either * of the following formats: *
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
* ID for the KMS key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either * of the following formats: *
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
* ID for the KMS key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either * of the following formats: *
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
* KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
*
* Amazon Resource Name (ARN) of a KMS Key:
* "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to use Amazon Key * Management Service (KMS) to encrypt or decrypt the custom model. *
* * @param dataAccessRoleArn * The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to use Amazon Key * Management Service (KMS) to encrypt or decrypt the custom model. */ public void setDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to use Amazon Key * Management Service (KMS) to encrypt or decrypt the custom model. *
* * @return The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to use Amazon Key * Management Service (KMS) to encrypt or decrypt the custom model. */ public String getDataAccessRoleArn() { return this.dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to use Amazon Key * Management Service (KMS) to encrypt or decrypt the custom model. *
* * @param dataAccessRoleArn * The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to use Amazon Key * Management Service (KMS) to encrypt or decrypt the custom model. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportModelRequest withDataAccessRoleArn(String dataAccessRoleArn) { setDataAccessRoleArn(dataAccessRoleArn); return this; } /** ** Tags to associate with the custom model that is created by this import. A tag is a key-value pair that adds as a * metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a * resource to indicate its use by the sales department. *
* * @return Tags to associate with the custom model that is created by this import. A tag is a key-value pair that * adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key * might be added to a resource to indicate its use by the sales department. */ public java.util.List* Tags to associate with the custom model that is created by this import. A tag is a key-value pair that adds as a * metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a * resource to indicate its use by the sales department. *
* * @param tags * Tags to associate with the custom model that is created by this import. A tag is a key-value pair that * adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key * might be added to a resource to indicate its use by the sales department. */ public void setTags(java.util.Collection* Tags to associate with the custom model that is created by this import. A tag is a key-value pair that adds as a * metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a * resource to indicate its use by the sales department. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * Tags to associate with the custom model that is created by this import. A tag is a key-value pair that * adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key * might be added to a resource to indicate its use by the sales department. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportModelRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* Tags to associate with the custom model that is created by this import. A tag is a key-value pair that adds as a * metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a * resource to indicate its use by the sales department. *
* * @param tags * Tags to associate with the custom model that is created by this import. A tag is a key-value pair that * adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key * might be added to a resource to indicate its use by the sales department. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportModelRequest withTags(java.util.Collection