/* * 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.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Specifies an encryption configuration. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EncryptionConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** The encryption configuration for Amazon Simple Storage Service (Amazon S3) data. *
*/ private java.util.List* The encryption configuration for Amazon CloudWatch. *
*/ private CloudWatchEncryption cloudWatchEncryption; /** ** The encryption configuration for job bookmarks. *
*/ private JobBookmarksEncryption jobBookmarksEncryption; /** ** The encryption configuration for Amazon Simple Storage Service (Amazon S3) data. *
* * @return The encryption configuration for Amazon Simple Storage Service (Amazon S3) data. */ public java.util.List* The encryption configuration for Amazon Simple Storage Service (Amazon S3) data. *
* * @param s3Encryption * The encryption configuration for Amazon Simple Storage Service (Amazon S3) data. */ public void setS3Encryption(java.util.Collection* The encryption configuration for Amazon Simple Storage Service (Amazon S3) data. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setS3Encryption(java.util.Collection)} or {@link #withS3Encryption(java.util.Collection)} if you want to * override the existing values. *
* * @param s3Encryption * The encryption configuration for Amazon Simple Storage Service (Amazon S3) data. * @return Returns a reference to this object so that method calls can be chained together. */ public EncryptionConfiguration withS3Encryption(S3Encryption... s3Encryption) { if (this.s3Encryption == null) { setS3Encryption(new java.util.ArrayList* The encryption configuration for Amazon Simple Storage Service (Amazon S3) data. *
* * @param s3Encryption * The encryption configuration for Amazon Simple Storage Service (Amazon S3) data. * @return Returns a reference to this object so that method calls can be chained together. */ public EncryptionConfiguration withS3Encryption(java.util.Collection* The encryption configuration for Amazon CloudWatch. *
* * @param cloudWatchEncryption * The encryption configuration for Amazon CloudWatch. */ public void setCloudWatchEncryption(CloudWatchEncryption cloudWatchEncryption) { this.cloudWatchEncryption = cloudWatchEncryption; } /** ** The encryption configuration for Amazon CloudWatch. *
* * @return The encryption configuration for Amazon CloudWatch. */ public CloudWatchEncryption getCloudWatchEncryption() { return this.cloudWatchEncryption; } /** ** The encryption configuration for Amazon CloudWatch. *
* * @param cloudWatchEncryption * The encryption configuration for Amazon CloudWatch. * @return Returns a reference to this object so that method calls can be chained together. */ public EncryptionConfiguration withCloudWatchEncryption(CloudWatchEncryption cloudWatchEncryption) { setCloudWatchEncryption(cloudWatchEncryption); return this; } /** ** The encryption configuration for job bookmarks. *
* * @param jobBookmarksEncryption * The encryption configuration for job bookmarks. */ public void setJobBookmarksEncryption(JobBookmarksEncryption jobBookmarksEncryption) { this.jobBookmarksEncryption = jobBookmarksEncryption; } /** ** The encryption configuration for job bookmarks. *
* * @return The encryption configuration for job bookmarks. */ public JobBookmarksEncryption getJobBookmarksEncryption() { return this.jobBookmarksEncryption; } /** ** The encryption configuration for job bookmarks. *
* * @param jobBookmarksEncryption * The encryption configuration for job bookmarks. * @return Returns a reference to this object so that method calls can be chained together. */ public EncryptionConfiguration withJobBookmarksEncryption(JobBookmarksEncryption jobBookmarksEncryption) { setJobBookmarksEncryption(jobBookmarksEncryption); 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 (getS3Encryption() != null) sb.append("S3Encryption: ").append(getS3Encryption()).append(","); if (getCloudWatchEncryption() != null) sb.append("CloudWatchEncryption: ").append(getCloudWatchEncryption()).append(","); if (getJobBookmarksEncryption() != null) sb.append("JobBookmarksEncryption: ").append(getJobBookmarksEncryption()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EncryptionConfiguration == false) return false; EncryptionConfiguration other = (EncryptionConfiguration) obj; if (other.getS3Encryption() == null ^ this.getS3Encryption() == null) return false; if (other.getS3Encryption() != null && other.getS3Encryption().equals(this.getS3Encryption()) == false) return false; if (other.getCloudWatchEncryption() == null ^ this.getCloudWatchEncryption() == null) return false; if (other.getCloudWatchEncryption() != null && other.getCloudWatchEncryption().equals(this.getCloudWatchEncryption()) == false) return false; if (other.getJobBookmarksEncryption() == null ^ this.getJobBookmarksEncryption() == null) return false; if (other.getJobBookmarksEncryption() != null && other.getJobBookmarksEncryption().equals(this.getJobBookmarksEncryption()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getS3Encryption() == null) ? 0 : getS3Encryption().hashCode()); hashCode = prime * hashCode + ((getCloudWatchEncryption() == null) ? 0 : getCloudWatchEncryption().hashCode()); hashCode = prime * hashCode + ((getJobBookmarksEncryption() == null) ? 0 : getJobBookmarksEncryption().hashCode()); return hashCode; } @Override public EncryptionConfiguration clone() { try { return (EncryptionConfiguration) 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.glue.model.transform.EncryptionConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }