
com.amazonaws.services.iotsitewise.model.DescribeDefaultEncryptionConfigurationResult Maven / Gradle / Ivy
/*
* 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.iotsitewise.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeDefaultEncryptionConfigurationResult extends com.amazonaws.AmazonWebServiceResult implements Serializable,
Cloneable {
/**
*
* The type of encryption used for the encryption configuration.
*
*/
private String encryptionType;
/**
*
* The key ARN of the customer managed key used for KMS encryption if you use KMS_BASED_ENCRYPTION
.
*
*/
private String kmsKeyArn;
/**
*
* The status of the account configuration. This contains the ConfigurationState
. If there's an error,
* it also contains the ErrorDetails
.
*
*/
private ConfigurationStatus configurationStatus;
/**
*
* The type of encryption used for the encryption configuration.
*
*
* @param encryptionType
* The type of encryption used for the encryption configuration.
* @see EncryptionType
*/
public void setEncryptionType(String encryptionType) {
this.encryptionType = encryptionType;
}
/**
*
* The type of encryption used for the encryption configuration.
*
*
* @return The type of encryption used for the encryption configuration.
* @see EncryptionType
*/
public String getEncryptionType() {
return this.encryptionType;
}
/**
*
* The type of encryption used for the encryption configuration.
*
*
* @param encryptionType
* The type of encryption used for the encryption configuration.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EncryptionType
*/
public DescribeDefaultEncryptionConfigurationResult withEncryptionType(String encryptionType) {
setEncryptionType(encryptionType);
return this;
}
/**
*
* The type of encryption used for the encryption configuration.
*
*
* @param encryptionType
* The type of encryption used for the encryption configuration.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EncryptionType
*/
public DescribeDefaultEncryptionConfigurationResult withEncryptionType(EncryptionType encryptionType) {
this.encryptionType = encryptionType.toString();
return this;
}
/**
*
* The key ARN of the customer managed key used for KMS encryption if you use KMS_BASED_ENCRYPTION
.
*
*
* @param kmsKeyArn
* The key ARN of the customer managed key used for KMS encryption if you use
* KMS_BASED_ENCRYPTION
.
*/
public void setKmsKeyArn(String kmsKeyArn) {
this.kmsKeyArn = kmsKeyArn;
}
/**
*
* The key ARN of the customer managed key used for KMS encryption if you use KMS_BASED_ENCRYPTION
.
*
*
* @return The key ARN of the customer managed key used for KMS encryption if you use
* KMS_BASED_ENCRYPTION
.
*/
public String getKmsKeyArn() {
return this.kmsKeyArn;
}
/**
*
* The key ARN of the customer managed key used for KMS encryption if you use KMS_BASED_ENCRYPTION
.
*
*
* @param kmsKeyArn
* The key ARN of the customer managed key used for KMS encryption if you use
* KMS_BASED_ENCRYPTION
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDefaultEncryptionConfigurationResult withKmsKeyArn(String kmsKeyArn) {
setKmsKeyArn(kmsKeyArn);
return this;
}
/**
*
* The status of the account configuration. This contains the ConfigurationState
. If there's an error,
* it also contains the ErrorDetails
.
*
*
* @param configurationStatus
* The status of the account configuration. This contains the ConfigurationState
. If there's an
* error, it also contains the ErrorDetails
.
*/
public void setConfigurationStatus(ConfigurationStatus configurationStatus) {
this.configurationStatus = configurationStatus;
}
/**
*
* The status of the account configuration. This contains the ConfigurationState
. If there's an error,
* it also contains the ErrorDetails
.
*
*
* @return The status of the account configuration. This contains the ConfigurationState
. If there's an
* error, it also contains the ErrorDetails
.
*/
public ConfigurationStatus getConfigurationStatus() {
return this.configurationStatus;
}
/**
*
* The status of the account configuration. This contains the ConfigurationState
. If there's an error,
* it also contains the ErrorDetails
.
*
*
* @param configurationStatus
* The status of the account configuration. This contains the ConfigurationState
. If there's an
* error, it also contains the ErrorDetails
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeDefaultEncryptionConfigurationResult withConfigurationStatus(ConfigurationStatus configurationStatus) {
setConfigurationStatus(configurationStatus);
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 (getEncryptionType() != null)
sb.append("EncryptionType: ").append(getEncryptionType()).append(",");
if (getKmsKeyArn() != null)
sb.append("KmsKeyArn: ").append(getKmsKeyArn()).append(",");
if (getConfigurationStatus() != null)
sb.append("ConfigurationStatus: ").append(getConfigurationStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeDefaultEncryptionConfigurationResult == false)
return false;
DescribeDefaultEncryptionConfigurationResult other = (DescribeDefaultEncryptionConfigurationResult) obj;
if (other.getEncryptionType() == null ^ this.getEncryptionType() == null)
return false;
if (other.getEncryptionType() != null && other.getEncryptionType().equals(this.getEncryptionType()) == false)
return false;
if (other.getKmsKeyArn() == null ^ this.getKmsKeyArn() == null)
return false;
if (other.getKmsKeyArn() != null && other.getKmsKeyArn().equals(this.getKmsKeyArn()) == false)
return false;
if (other.getConfigurationStatus() == null ^ this.getConfigurationStatus() == null)
return false;
if (other.getConfigurationStatus() != null && other.getConfigurationStatus().equals(this.getConfigurationStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEncryptionType() == null) ? 0 : getEncryptionType().hashCode());
hashCode = prime * hashCode + ((getKmsKeyArn() == null) ? 0 : getKmsKeyArn().hashCode());
hashCode = prime * hashCode + ((getConfigurationStatus() == null) ? 0 : getConfigurationStatus().hashCode());
return hashCode;
}
@Override
public DescribeDefaultEncryptionConfigurationResult clone() {
try {
return (DescribeDefaultEncryptionConfigurationResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}