com.amazonaws.services.comprehend.model.UpdateDataSecurityConfig Maven / Gradle / Ivy
Show all versions of aws-java-sdk-comprehend Show documentation
/*
* 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Data security configuration.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateDataSecurityConfig implements Serializable, Cloneable, StructuredPojo {
/**
*
* 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"
*
*
*
*/
private String modelKmsKeyId;
/**
*
* ID for the KMS key that Amazon Comprehend uses to encrypt the volume.
*
*/
private String volumeKmsKeyId;
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:
*
*
* -
*
* 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"
*
*
*
*
* @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:
*
* -
*
* 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"
*
*
*/
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:
*
*
* -
*
* 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"
*
*
*
*
* @return 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"
*
*
*/
public String getModelKmsKeyId() {
return this.modelKmsKeyId;
}
/**
*
* 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"
*
*
*
*
* @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:
*
* -
*
* 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"
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDataSecurityConfig withModelKmsKeyId(String modelKmsKeyId) {
setModelKmsKeyId(modelKmsKeyId);
return this;
}
/**
*
* ID for the KMS key that Amazon Comprehend uses to encrypt the volume.
*
*
* @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.
*
*
* @return ID for the KMS key that Amazon Comprehend uses to encrypt the volume.
*/
public String getVolumeKmsKeyId() {
return this.volumeKmsKeyId;
}
/**
*
* ID for the KMS key that Amazon Comprehend uses to encrypt the volume.
*
*
* @param volumeKmsKeyId
* ID for the KMS key that Amazon Comprehend uses to encrypt the volume.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDataSecurityConfig withVolumeKmsKeyId(String volumeKmsKeyId) {
setVolumeKmsKeyId(volumeKmsKeyId);
return this;
}
/**
* @param vpcConfig
*/
public void setVpcConfig(VpcConfig vpcConfig) {
this.vpcConfig = vpcConfig;
}
/**
* @return
*/
public VpcConfig getVpcConfig() {
return this.vpcConfig;
}
/**
* @param vpcConfig
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDataSecurityConfig withVpcConfig(VpcConfig vpcConfig) {
setVpcConfig(vpcConfig);
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 (getModelKmsKeyId() != null)
sb.append("ModelKmsKeyId: ").append(getModelKmsKeyId()).append(",");
if (getVolumeKmsKeyId() != null)
sb.append("VolumeKmsKeyId: ").append(getVolumeKmsKeyId()).append(",");
if (getVpcConfig() != null)
sb.append("VpcConfig: ").append(getVpcConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateDataSecurityConfig == false)
return false;
UpdateDataSecurityConfig other = (UpdateDataSecurityConfig) 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.getVpcConfig() == null ^ this.getVpcConfig() == null)
return false;
if (other.getVpcConfig() != null && other.getVpcConfig().equals(this.getVpcConfig()) == false)
return false;
return true;
}
@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 + ((getVpcConfig() == null) ? 0 : getVpcConfig().hashCode());
return hashCode;
}
@Override
public UpdateDataSecurityConfig clone() {
try {
return (UpdateDataSecurityConfig) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.comprehend.model.transform.UpdateDataSecurityConfigMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}