/* * 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.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Security options. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AutoMLSecurityConfig implements Serializable, Cloneable, StructuredPojo { /** *

* The key used to encrypt stored data. *

*/ private String volumeKmsKeyId; /** *

* Whether to use traffic encryption between the container layers. *

*/ private Boolean enableInterContainerTrafficEncryption; /** *

* The VPC configuration. *

*/ private VpcConfig vpcConfig; /** *

* The key used to encrypt stored data. *

* * @param volumeKmsKeyId * The key used to encrypt stored data. */ public void setVolumeKmsKeyId(String volumeKmsKeyId) { this.volumeKmsKeyId = volumeKmsKeyId; } /** *

* The key used to encrypt stored data. *

* * @return The key used to encrypt stored data. */ public String getVolumeKmsKeyId() { return this.volumeKmsKeyId; } /** *

* The key used to encrypt stored data. *

* * @param volumeKmsKeyId * The key used to encrypt stored data. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLSecurityConfig withVolumeKmsKeyId(String volumeKmsKeyId) { setVolumeKmsKeyId(volumeKmsKeyId); return this; } /** *

* Whether to use traffic encryption between the container layers. *

* * @param enableInterContainerTrafficEncryption * Whether to use traffic encryption between the container layers. */ public void setEnableInterContainerTrafficEncryption(Boolean enableInterContainerTrafficEncryption) { this.enableInterContainerTrafficEncryption = enableInterContainerTrafficEncryption; } /** *

* Whether to use traffic encryption between the container layers. *

* * @return Whether to use traffic encryption between the container layers. */ public Boolean getEnableInterContainerTrafficEncryption() { return this.enableInterContainerTrafficEncryption; } /** *

* Whether to use traffic encryption between the container layers. *

* * @param enableInterContainerTrafficEncryption * Whether to use traffic encryption between the container layers. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLSecurityConfig withEnableInterContainerTrafficEncryption(Boolean enableInterContainerTrafficEncryption) { setEnableInterContainerTrafficEncryption(enableInterContainerTrafficEncryption); return this; } /** *

* Whether to use traffic encryption between the container layers. *

* * @return Whether to use traffic encryption between the container layers. */ public Boolean isEnableInterContainerTrafficEncryption() { return this.enableInterContainerTrafficEncryption; } /** *

* The VPC configuration. *

* * @param vpcConfig * The VPC configuration. */ public void setVpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; } /** *

* The VPC configuration. *

* * @return The VPC configuration. */ public VpcConfig getVpcConfig() { return this.vpcConfig; } /** *

* The VPC configuration. *

* * @param vpcConfig * The VPC configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoMLSecurityConfig 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 (getVolumeKmsKeyId() != null) sb.append("VolumeKmsKeyId: ").append(getVolumeKmsKeyId()).append(","); if (getEnableInterContainerTrafficEncryption() != null) sb.append("EnableInterContainerTrafficEncryption: ").append(getEnableInterContainerTrafficEncryption()).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 AutoMLSecurityConfig == false) return false; AutoMLSecurityConfig other = (AutoMLSecurityConfig) obj; if (other.getVolumeKmsKeyId() == null ^ this.getVolumeKmsKeyId() == null) return false; if (other.getVolumeKmsKeyId() != null && other.getVolumeKmsKeyId().equals(this.getVolumeKmsKeyId()) == false) return false; if (other.getEnableInterContainerTrafficEncryption() == null ^ this.getEnableInterContainerTrafficEncryption() == null) return false; if (other.getEnableInterContainerTrafficEncryption() != null && other.getEnableInterContainerTrafficEncryption().equals(this.getEnableInterContainerTrafficEncryption()) == 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 + ((getVolumeKmsKeyId() == null) ? 0 : getVolumeKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getEnableInterContainerTrafficEncryption() == null) ? 0 : getEnableInterContainerTrafficEncryption().hashCode()); hashCode = prime * hashCode + ((getVpcConfig() == null) ? 0 : getVpcConfig().hashCode()); return hashCode; } @Override public AutoMLSecurityConfig clone() { try { return (AutoMLSecurityConfig) 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.sagemaker.model.transform.AutoMLSecurityConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }