/* * 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.rekognition.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CopyProjectVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The ARN of the source project in the trusting AWS account. *
*/ private String sourceProjectArn; /** ** The ARN of the model version in the source project that you want to copy to a destination project. *
*/ private String sourceProjectVersionArn; /** ** The ARN of the project in the trusted AWS account that you want to copy the model version to. *
*/ private String destinationProjectArn; /** ** A name for the version of the model that's copied to the destination project. *
*/ private String versionName; /** ** The S3 bucket and folder location where the training output for the source model version is placed. *
*/ private OutputConfig outputConfig; /** ** The key-value tags to assign to the model version. *
*/ private java.util.Map
* The identifier for your AWS Key Management Service key (AWS KMS key). You can supply the Amazon Resource Name
* (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. The key is used to
* encrypt training results and manifest files written to the output Amazon S3 bucket (OutputConfig
).
*
* If you choose to use your own KMS key, you need the following permissions on the KMS key. *
** kms:CreateGrant *
** kms:DescribeKey *
** kms:GenerateDataKey *
** kms:Decrypt *
*
* If you don't specify a value for KmsKeyId
, images copied into the service are encrypted using a key
* that AWS owns and manages.
*
* The ARN of the source project in the trusting AWS account. *
* * @param sourceProjectArn * The ARN of the source project in the trusting AWS account. */ public void setSourceProjectArn(String sourceProjectArn) { this.sourceProjectArn = sourceProjectArn; } /** ** The ARN of the source project in the trusting AWS account. *
* * @return The ARN of the source project in the trusting AWS account. */ public String getSourceProjectArn() { return this.sourceProjectArn; } /** ** The ARN of the source project in the trusting AWS account. *
* * @param sourceProjectArn * The ARN of the source project in the trusting AWS account. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyProjectVersionRequest withSourceProjectArn(String sourceProjectArn) { setSourceProjectArn(sourceProjectArn); return this; } /** ** The ARN of the model version in the source project that you want to copy to a destination project. *
* * @param sourceProjectVersionArn * The ARN of the model version in the source project that you want to copy to a destination project. */ public void setSourceProjectVersionArn(String sourceProjectVersionArn) { this.sourceProjectVersionArn = sourceProjectVersionArn; } /** ** The ARN of the model version in the source project that you want to copy to a destination project. *
* * @return The ARN of the model version in the source project that you want to copy to a destination project. */ public String getSourceProjectVersionArn() { return this.sourceProjectVersionArn; } /** ** The ARN of the model version in the source project that you want to copy to a destination project. *
* * @param sourceProjectVersionArn * The ARN of the model version in the source project that you want to copy to a destination project. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyProjectVersionRequest withSourceProjectVersionArn(String sourceProjectVersionArn) { setSourceProjectVersionArn(sourceProjectVersionArn); return this; } /** ** The ARN of the project in the trusted AWS account that you want to copy the model version to. *
* * @param destinationProjectArn * The ARN of the project in the trusted AWS account that you want to copy the model version to. */ public void setDestinationProjectArn(String destinationProjectArn) { this.destinationProjectArn = destinationProjectArn; } /** ** The ARN of the project in the trusted AWS account that you want to copy the model version to. *
* * @return The ARN of the project in the trusted AWS account that you want to copy the model version to. */ public String getDestinationProjectArn() { return this.destinationProjectArn; } /** ** The ARN of the project in the trusted AWS account that you want to copy the model version to. *
* * @param destinationProjectArn * The ARN of the project in the trusted AWS account that you want to copy the model version to. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyProjectVersionRequest withDestinationProjectArn(String destinationProjectArn) { setDestinationProjectArn(destinationProjectArn); return this; } /** ** A name for the version of the model that's copied to the destination project. *
* * @param versionName * A name for the version of the model that's copied to the destination project. */ public void setVersionName(String versionName) { this.versionName = versionName; } /** ** A name for the version of the model that's copied to the destination project. *
* * @return A name for the version of the model that's copied to the destination project. */ public String getVersionName() { return this.versionName; } /** ** A name for the version of the model that's copied to the destination project. *
* * @param versionName * A name for the version of the model that's copied to the destination project. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyProjectVersionRequest withVersionName(String versionName) { setVersionName(versionName); return this; } /** ** The S3 bucket and folder location where the training output for the source model version is placed. *
* * @param outputConfig * The S3 bucket and folder location where the training output for the source model version is placed. */ public void setOutputConfig(OutputConfig outputConfig) { this.outputConfig = outputConfig; } /** ** The S3 bucket and folder location where the training output for the source model version is placed. *
* * @return The S3 bucket and folder location where the training output for the source model version is placed. */ public OutputConfig getOutputConfig() { return this.outputConfig; } /** ** The S3 bucket and folder location where the training output for the source model version is placed. *
* * @param outputConfig * The S3 bucket and folder location where the training output for the source model version is placed. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyProjectVersionRequest withOutputConfig(OutputConfig outputConfig) { setOutputConfig(outputConfig); return this; } /** ** The key-value tags to assign to the model version. *
* * @return The key-value tags to assign to the model version. */ public java.util.Map* The key-value tags to assign to the model version. *
* * @param tags * The key-value tags to assign to the model version. */ public void setTags(java.util.Map* The key-value tags to assign to the model version. *
* * @param tags * The key-value tags to assign to the model version. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyProjectVersionRequest withTags(java.util.Map
* The identifier for your AWS Key Management Service key (AWS KMS key). You can supply the Amazon Resource Name
* (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. The key is used to
* encrypt training results and manifest files written to the output Amazon S3 bucket (OutputConfig
).
*
* If you choose to use your own KMS key, you need the following permissions on the KMS key. *
** kms:CreateGrant *
** kms:DescribeKey *
** kms:GenerateDataKey *
** kms:Decrypt *
*
* If you don't specify a value for KmsKeyId
, images copied into the service are encrypted using a key
* that AWS owns and manages.
*
OutputConfig
).
* * If you choose to use your own KMS key, you need the following permissions on the KMS key. *
** kms:CreateGrant *
** kms:DescribeKey *
** kms:GenerateDataKey *
** kms:Decrypt *
*
* If you don't specify a value for KmsKeyId
, images copied into the service are encrypted using
* a key that AWS owns and manages.
*/
public void setKmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
/**
*
* The identifier for your AWS Key Management Service key (AWS KMS key). You can supply the Amazon Resource Name
* (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. The key is used to
* encrypt training results and manifest files written to the output Amazon S3 bucket (OutputConfig
).
*
* If you choose to use your own KMS key, you need the following permissions on the KMS key. *
** kms:CreateGrant *
** kms:DescribeKey *
** kms:GenerateDataKey *
** kms:Decrypt *
*
* If you don't specify a value for KmsKeyId
, images copied into the service are encrypted using a key
* that AWS owns and manages.
*
OutputConfig
).
* * If you choose to use your own KMS key, you need the following permissions on the KMS key. *
** kms:CreateGrant *
** kms:DescribeKey *
** kms:GenerateDataKey *
** kms:Decrypt *
*
* If you don't specify a value for KmsKeyId
, images copied into the service are encrypted
* using a key that AWS owns and manages.
*/
public String getKmsKeyId() {
return this.kmsKeyId;
}
/**
*
* The identifier for your AWS Key Management Service key (AWS KMS key). You can supply the Amazon Resource Name
* (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. The key is used to
* encrypt training results and manifest files written to the output Amazon S3 bucket (OutputConfig
).
*
* If you choose to use your own KMS key, you need the following permissions on the KMS key. *
** kms:CreateGrant *
** kms:DescribeKey *
** kms:GenerateDataKey *
** kms:Decrypt *
*
* If you don't specify a value for KmsKeyId
, images copied into the service are encrypted using a key
* that AWS owns and manages.
*
OutputConfig
).
* * If you choose to use your own KMS key, you need the following permissions on the KMS key. *
** kms:CreateGrant *
** kms:DescribeKey *
** kms:GenerateDataKey *
** kms:Decrypt *
*
* If you don't specify a value for KmsKeyId
, images copied into the service are encrypted using
* a key that AWS owns and manages.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CopyProjectVersionRequest withKmsKeyId(String kmsKeyId) {
setKmsKeyId(kmsKeyId);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getSourceProjectArn() != null)
sb.append("SourceProjectArn: ").append(getSourceProjectArn()).append(",");
if (getSourceProjectVersionArn() != null)
sb.append("SourceProjectVersionArn: ").append(getSourceProjectVersionArn()).append(",");
if (getDestinationProjectArn() != null)
sb.append("DestinationProjectArn: ").append(getDestinationProjectArn()).append(",");
if (getVersionName() != null)
sb.append("VersionName: ").append(getVersionName()).append(",");
if (getOutputConfig() != null)
sb.append("OutputConfig: ").append(getOutputConfig()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getKmsKeyId() != null)
sb.append("KmsKeyId: ").append(getKmsKeyId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CopyProjectVersionRequest == false)
return false;
CopyProjectVersionRequest other = (CopyProjectVersionRequest) obj;
if (other.getSourceProjectArn() == null ^ this.getSourceProjectArn() == null)
return false;
if (other.getSourceProjectArn() != null && other.getSourceProjectArn().equals(this.getSourceProjectArn()) == false)
return false;
if (other.getSourceProjectVersionArn() == null ^ this.getSourceProjectVersionArn() == null)
return false;
if (other.getSourceProjectVersionArn() != null && other.getSourceProjectVersionArn().equals(this.getSourceProjectVersionArn()) == false)
return false;
if (other.getDestinationProjectArn() == null ^ this.getDestinationProjectArn() == null)
return false;
if (other.getDestinationProjectArn() != null && other.getDestinationProjectArn().equals(this.getDestinationProjectArn()) == false)
return false;
if (other.getVersionName() == null ^ this.getVersionName() == null)
return false;
if (other.getVersionName() != null && other.getVersionName().equals(this.getVersionName()) == false)
return false;
if (other.getOutputConfig() == null ^ this.getOutputConfig() == null)
return false;
if (other.getOutputConfig() != null && other.getOutputConfig().equals(this.getOutputConfig()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null)
return false;
if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSourceProjectArn() == null) ? 0 : getSourceProjectArn().hashCode());
hashCode = prime * hashCode + ((getSourceProjectVersionArn() == null) ? 0 : getSourceProjectVersionArn().hashCode());
hashCode = prime * hashCode + ((getDestinationProjectArn() == null) ? 0 : getDestinationProjectArn().hashCode());
hashCode = prime * hashCode + ((getVersionName() == null) ? 0 : getVersionName().hashCode());
hashCode = prime * hashCode + ((getOutputConfig() == null) ? 0 : getOutputConfig().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode());
return hashCode;
}
@Override
public CopyProjectVersionRequest clone() {
return (CopyProjectVersionRequest) super.clone();
}
}