All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.dynamodbv2.model.SSESpecification Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon DynamoDB module holds the client classes that are used for communicating with Amazon DynamoDB Service

There is a newer version: 1.12.765
Show newest version
/*
 * Copyright 2016-2021 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.dynamodbv2.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Represents the settings used to enable server-side encryption. *

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

* Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled (true), * server-side encryption type is set to KMS and an AWS managed CMK is used (AWS KMS charges apply). If * disabled (false) or not specified, server-side encryption is set to AWS owned CMK. *

*/ private Boolean enabled; /** *

* Server-side encryption type. The only supported value is: *

*
    *
  • *

    * KMS - Server-side encryption that uses AWS Key Management Service. The key is stored in your account * and is managed by AWS KMS (AWS KMS charges apply). *

    *
  • *
*/ private String sSEType; /** *

* The AWS KMS customer master key (CMK) that should be used for the AWS KMS encryption. To specify a CMK, use its * key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if * the key is different from the default DynamoDB customer master key alias/aws/dynamodb. *

*/ private String kMSMasterKeyId; /** *

* Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled (true), * server-side encryption type is set to KMS and an AWS managed CMK is used (AWS KMS charges apply). If * disabled (false) or not specified, server-side encryption is set to AWS owned CMK. *

* * @param enabled * Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled * (true), server-side encryption type is set to KMS and an AWS managed CMK is used (AWS KMS * charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned CMK. */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } /** *

* Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled (true), * server-side encryption type is set to KMS and an AWS managed CMK is used (AWS KMS charges apply). If * disabled (false) or not specified, server-side encryption is set to AWS owned CMK. *

* * @return Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled * (true), server-side encryption type is set to KMS and an AWS managed CMK is used (AWS KMS * charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned CMK. */ public Boolean getEnabled() { return this.enabled; } /** *

* Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled (true), * server-side encryption type is set to KMS and an AWS managed CMK is used (AWS KMS charges apply). If * disabled (false) or not specified, server-side encryption is set to AWS owned CMK. *

* * @param enabled * Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled * (true), server-side encryption type is set to KMS and an AWS managed CMK is used (AWS KMS * charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned CMK. * @return Returns a reference to this object so that method calls can be chained together. */ public SSESpecification withEnabled(Boolean enabled) { setEnabled(enabled); return this; } /** *

* Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled (true), * server-side encryption type is set to KMS and an AWS managed CMK is used (AWS KMS charges apply). If * disabled (false) or not specified, server-side encryption is set to AWS owned CMK. *

* * @return Indicates whether server-side encryption is done using an AWS managed CMK or an AWS owned CMK. If enabled * (true), server-side encryption type is set to KMS and an AWS managed CMK is used (AWS KMS * charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned CMK. */ public Boolean isEnabled() { return this.enabled; } /** *

* Server-side encryption type. The only supported value is: *

*
    *
  • *

    * KMS - Server-side encryption that uses AWS Key Management Service. The key is stored in your account * and is managed by AWS KMS (AWS KMS charges apply). *

    *
  • *
* * @param sSEType * Server-side encryption type. The only supported value is:

*
    *
  • *

    * KMS - Server-side encryption that uses AWS Key Management Service. The key is stored in your * account and is managed by AWS KMS (AWS KMS charges apply). *

    *
  • * @see SSEType */ public void setSSEType(String sSEType) { this.sSEType = sSEType; } /** *

    * Server-side encryption type. The only supported value is: *

    *
      *
    • *

      * KMS - Server-side encryption that uses AWS Key Management Service. The key is stored in your account * and is managed by AWS KMS (AWS KMS charges apply). *

      *
    • *
    * * @return Server-side encryption type. The only supported value is:

    *
      *
    • *

      * KMS - Server-side encryption that uses AWS Key Management Service. The key is stored in your * account and is managed by AWS KMS (AWS KMS charges apply). *

      *
    • * @see SSEType */ public String getSSEType() { return this.sSEType; } /** *

      * Server-side encryption type. The only supported value is: *

      *
        *
      • *

        * KMS - Server-side encryption that uses AWS Key Management Service. The key is stored in your account * and is managed by AWS KMS (AWS KMS charges apply). *

        *
      • *
      * * @param sSEType * Server-side encryption type. The only supported value is:

      *
        *
      • *

        * KMS - Server-side encryption that uses AWS Key Management Service. The key is stored in your * account and is managed by AWS KMS (AWS KMS charges apply). *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see SSEType */ public SSESpecification withSSEType(String sSEType) { setSSEType(sSEType); return this; } /** *

        * Server-side encryption type. The only supported value is: *

        *
          *
        • *

          * KMS - Server-side encryption that uses AWS Key Management Service. The key is stored in your account * and is managed by AWS KMS (AWS KMS charges apply). *

          *
        • *
        * * @param sSEType * Server-side encryption type. The only supported value is:

        *
          *
        • *

          * KMS - Server-side encryption that uses AWS Key Management Service. The key is stored in your * account and is managed by AWS KMS (AWS KMS charges apply). *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see SSEType */ public SSESpecification withSSEType(SSEType sSEType) { this.sSEType = sSEType.toString(); return this; } /** *

          * The AWS KMS customer master key (CMK) that should be used for the AWS KMS encryption. To specify a CMK, use its * key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if * the key is different from the default DynamoDB customer master key alias/aws/dynamodb. *

          * * @param kMSMasterKeyId * The AWS KMS customer master key (CMK) that should be used for the AWS KMS encryption. To specify a CMK, * use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide * this parameter if the key is different from the default DynamoDB customer master key alias/aws/dynamodb. */ public void setKMSMasterKeyId(String kMSMasterKeyId) { this.kMSMasterKeyId = kMSMasterKeyId; } /** *

          * The AWS KMS customer master key (CMK) that should be used for the AWS KMS encryption. To specify a CMK, use its * key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if * the key is different from the default DynamoDB customer master key alias/aws/dynamodb. *

          * * @return The AWS KMS customer master key (CMK) that should be used for the AWS KMS encryption. To specify a CMK, * use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide * this parameter if the key is different from the default DynamoDB customer master key alias/aws/dynamodb. */ public String getKMSMasterKeyId() { return this.kMSMasterKeyId; } /** *

          * The AWS KMS customer master key (CMK) that should be used for the AWS KMS encryption. To specify a CMK, use its * key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if * the key is different from the default DynamoDB customer master key alias/aws/dynamodb. *

          * * @param kMSMasterKeyId * The AWS KMS customer master key (CMK) that should be used for the AWS KMS encryption. To specify a CMK, * use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide * this parameter if the key is different from the default DynamoDB customer master key alias/aws/dynamodb. * @return Returns a reference to this object so that method calls can be chained together. */ public SSESpecification withKMSMasterKeyId(String kMSMasterKeyId) { setKMSMasterKeyId(kMSMasterKeyId); 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 (getEnabled() != null) sb.append("Enabled: ").append(getEnabled()).append(","); if (getSSEType() != null) sb.append("SSEType: ").append(getSSEType()).append(","); if (getKMSMasterKeyId() != null) sb.append("KMSMasterKeyId: ").append(getKMSMasterKeyId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SSESpecification == false) return false; SSESpecification other = (SSESpecification) obj; if (other.getEnabled() == null ^ this.getEnabled() == null) return false; if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false) return false; if (other.getSSEType() == null ^ this.getSSEType() == null) return false; if (other.getSSEType() != null && other.getSSEType().equals(this.getSSEType()) == false) return false; if (other.getKMSMasterKeyId() == null ^ this.getKMSMasterKeyId() == null) return false; if (other.getKMSMasterKeyId() != null && other.getKMSMasterKeyId().equals(this.getKMSMasterKeyId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode()); hashCode = prime * hashCode + ((getSSEType() == null) ? 0 : getSSEType().hashCode()); hashCode = prime * hashCode + ((getKMSMasterKeyId() == null) ? 0 : getKMSMasterKeyId().hashCode()); return hashCode; } @Override public SSESpecification clone() { try { return (SSESpecification) 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.dynamodbv2.model.transform.SSESpecificationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy