/* * 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.comprehend.model; import java.io.Serializable; /** *

* Data security configuration. *

*/ public class DataSecurityConfig implements Serializable { /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt trained custom * models. The ModelKmsKeyId can be either of the following formats: *

* *

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*/ private String modelKmsKeyId; /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt the volume. *

*

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*/ private String volumeKmsKeyId; /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt the data in the * data lake. *

*

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
*/ private String dataLakeKmsKeyId; /** *

* Configuration parameters for an optional private Virtual Private Cloud * (VPC) containing the resources you are using for the job. For more * information, see Amazon VPC. *

*/ private VpcConfig vpcConfig; /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt trained custom * models. The ModelKmsKeyId can be either of the following formats: *

* *

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
* * @return

* ID for the KMS key that Amazon Comprehend uses to encrypt trained * custom models. The ModelKmsKeyId can be either of the following * formats: *

* */ public String getModelKmsKeyId() { return modelKmsKeyId; } /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt trained custom * models. The ModelKmsKeyId can be either of the following formats: *

* *

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
* * @param modelKmsKeyId

* ID for the KMS key that Amazon Comprehend uses to encrypt * trained custom models. The ModelKmsKeyId can be either of the * following formats: *

* */ public void setModelKmsKeyId(String modelKmsKeyId) { this.modelKmsKeyId = modelKmsKeyId; } /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt trained custom * models. The ModelKmsKeyId can be either of the following formats: *

* *

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
* * @param modelKmsKeyId

* ID for the KMS key that Amazon Comprehend uses to encrypt * trained custom models. The ModelKmsKeyId can be either of the * following formats: *

* * @return A reference to this updated object so that method calls can be * chained together. */ public DataSecurityConfig withModelKmsKeyId(String modelKmsKeyId) { this.modelKmsKeyId = modelKmsKeyId; return this; } /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt the volume. *

*

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
* * @return

* ID for the KMS key that Amazon Comprehend uses to encrypt the * volume. *

*/ public String getVolumeKmsKeyId() { return volumeKmsKeyId; } /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt the volume. *

*

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
* * @param volumeKmsKeyId

* ID for the KMS key that Amazon Comprehend uses to encrypt the * volume. *

*/ public void setVolumeKmsKeyId(String volumeKmsKeyId) { this.volumeKmsKeyId = volumeKmsKeyId; } /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt the volume. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
* * @param volumeKmsKeyId

* ID for the KMS key that Amazon Comprehend uses to encrypt the * volume. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DataSecurityConfig withVolumeKmsKeyId(String volumeKmsKeyId) { this.volumeKmsKeyId = volumeKmsKeyId; return this; } /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt the data in the * data lake. *

*

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
* * @return

* ID for the KMS key that Amazon Comprehend uses to encrypt the * data in the data lake. *

*/ public String getDataLakeKmsKeyId() { return dataLakeKmsKeyId; } /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt the data in the * data lake. *

*

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
* * @param dataLakeKmsKeyId

* ID for the KMS key that Amazon Comprehend uses to encrypt the * data in the data lake. *

*/ public void setDataLakeKmsKeyId(String dataLakeKmsKeyId) { this.dataLakeKmsKeyId = dataLakeKmsKeyId; } /** *

* ID for the KMS key that Amazon Comprehend uses to encrypt the data in the * data lake. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: - 2048
* Pattern: ^\p{ASCII}+$
* * @param dataLakeKmsKeyId

* ID for the KMS key that Amazon Comprehend uses to encrypt the * data in the data lake. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DataSecurityConfig withDataLakeKmsKeyId(String dataLakeKmsKeyId) { this.dataLakeKmsKeyId = dataLakeKmsKeyId; return this; } /** *

* Configuration parameters for an optional private Virtual Private Cloud * (VPC) containing the resources you are using for the job. For more * information, see Amazon VPC. *

* * @return

* Configuration parameters for an optional private Virtual Private * Cloud (VPC) containing the resources you are using for the job. * For more information, see Amazon VPC. *

*/ public VpcConfig getVpcConfig() { return vpcConfig; } /** *

* Configuration parameters for an optional private Virtual Private Cloud * (VPC) containing the resources you are using for the job. For more * information, see Amazon VPC. *

* * @param vpcConfig

* Configuration parameters for an optional private Virtual * Private Cloud (VPC) containing the resources you are using for * the job. For more information, see Amazon VPC. *

*/ public void setVpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; } /** *

* Configuration parameters for an optional private Virtual Private Cloud * (VPC) containing the resources you are using for the job. For more * information, see Amazon VPC. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param vpcConfig

* Configuration parameters for an optional private Virtual * Private Cloud (VPC) containing the resources you are using for * the job. For more information, see Amazon VPC. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DataSecurityConfig withVpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getModelKmsKeyId() != null) sb.append("ModelKmsKeyId: " + getModelKmsKeyId() + ","); if (getVolumeKmsKeyId() != null) sb.append("VolumeKmsKeyId: " + getVolumeKmsKeyId() + ","); if (getDataLakeKmsKeyId() != null) sb.append("DataLakeKmsKeyId: " + getDataLakeKmsKeyId() + ","); if (getVpcConfig() != null) sb.append("VpcConfig: " + getVpcConfig()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getModelKmsKeyId() == null) ? 0 : getModelKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getVolumeKmsKeyId() == null) ? 0 : getVolumeKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getDataLakeKmsKeyId() == null) ? 0 : getDataLakeKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getVpcConfig() == null) ? 0 : getVpcConfig().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DataSecurityConfig == false) return false; DataSecurityConfig other = (DataSecurityConfig) obj; if (other.getModelKmsKeyId() == null ^ this.getModelKmsKeyId() == null) return false; if (other.getModelKmsKeyId() != null && other.getModelKmsKeyId().equals(this.getModelKmsKeyId()) == false) return false; if (other.getVolumeKmsKeyId() == null ^ this.getVolumeKmsKeyId() == null) return false; if (other.getVolumeKmsKeyId() != null && other.getVolumeKmsKeyId().equals(this.getVolumeKmsKeyId()) == false) return false; if (other.getDataLakeKmsKeyId() == null ^ this.getDataLakeKmsKeyId() == null) return false; if (other.getDataLakeKmsKeyId() != null && other.getDataLakeKmsKeyId().equals(this.getDataLakeKmsKeyId()) == false) return false; if (other.getVpcConfig() == null ^ this.getVpcConfig() == null) return false; if (other.getVpcConfig() != null && other.getVpcConfig().equals(this.getVpcConfig()) == false) return false; return true; } }