@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || ! (obj instanceof Encryption)) {
            return false;
        }

        final Encryption other = (Encryption) obj;

        if (other.getKmsContext() == null ^ this.getKmsContext() == null)
            return false;
        if (other.getKmsContext() != null && !other.getKmsContext().equals(this.getKmsContext()))
            return false;
        if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null)
            return false;
        if (other.getKmsKeyId() != null && !other.getKmsKeyId().equals(this.getKmsKeyId()))
            return false;
        if (other.getEncryptionType() == null ^ this.getEncryptionType() == null)
            return false;
        if (other.getEncryptionType() != null && !other.getEncryptionType().equals(this.getEncryptionType()))
            return false;
        return true;
    }
Sets the optional value used to specify the encryption context for the restore results if the encryption type is <code>aws:kms</code>.

@param kmsContext The new kmsContext value.
@return This object for method chaining.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/Encryption.java