com.amazonaws.services.docdbelastic.model.ClusterSnapshot Maven / Gradle / Ivy
Show all versions of aws-java-sdk-docdbelastic Show documentation
/*
* Copyright 2019-2024 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.docdbelastic.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Returns information about a specific elastic cluster snapshot.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ClusterSnapshot implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the elastic cluster administrator.
*
*/
private String adminUserName;
/**
*
* The ARN identifier of the elastic cluster.
*
*/
private String clusterArn;
/**
*
* The time when the elastic cluster was created in Universal Coordinated Time (UTC).
*
*/
private String clusterCreationTime;
/**
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of
* the ARN as the KMS encryption key. If an encryption key is not specified here, Amazon DocumentDB uses the default
* encryption key that KMS creates for your account. Your account has a different default encryption key for each
* Amazon Region.
*
*/
private String kmsKeyId;
/**
*
* The ARN identifier of the elastic cluster snapshot.
*
*/
private String snapshotArn;
/**
*
* The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC).
*
*/
private String snapshotCreationTime;
/**
*
* The name of the elastic cluster snapshot.
*
*/
private String snapshotName;
/**
*
* The type of cluster snapshots to be returned. You can specify one of the following values:
*
*
* -
*
* automated
- Return all cluster snapshots that Amazon DocumentDB has automatically created for your
* Amazon Web Services account.
*
*
* -
*
* manual
- Return all cluster snapshots that you have manually created for your Amazon Web Services
* account.
*
*
*
*/
private String snapshotType;
/**
*
* The status of the elastic cluster snapshot.
*
*/
private String status;
/**
*
* The Amazon EC2 subnet IDs for the elastic cluster.
*
*/
private java.util.List subnetIds;
/**
*
* A list of EC2 VPC security groups to associate with the elastic cluster.
*
*/
private java.util.List vpcSecurityGroupIds;
/**
*
* The name of the elastic cluster administrator.
*
*
* @param adminUserName
* The name of the elastic cluster administrator.
*/
public void setAdminUserName(String adminUserName) {
this.adminUserName = adminUserName;
}
/**
*
* The name of the elastic cluster administrator.
*
*
* @return The name of the elastic cluster administrator.
*/
public String getAdminUserName() {
return this.adminUserName;
}
/**
*
* The name of the elastic cluster administrator.
*
*
* @param adminUserName
* The name of the elastic cluster administrator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withAdminUserName(String adminUserName) {
setAdminUserName(adminUserName);
return this;
}
/**
*
* The ARN identifier of the elastic cluster.
*
*
* @param clusterArn
* The ARN identifier of the elastic cluster.
*/
public void setClusterArn(String clusterArn) {
this.clusterArn = clusterArn;
}
/**
*
* The ARN identifier of the elastic cluster.
*
*
* @return The ARN identifier of the elastic cluster.
*/
public String getClusterArn() {
return this.clusterArn;
}
/**
*
* The ARN identifier of the elastic cluster.
*
*
* @param clusterArn
* The ARN identifier of the elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withClusterArn(String clusterArn) {
setClusterArn(clusterArn);
return this;
}
/**
*
* The time when the elastic cluster was created in Universal Coordinated Time (UTC).
*
*
* @param clusterCreationTime
* The time when the elastic cluster was created in Universal Coordinated Time (UTC).
*/
public void setClusterCreationTime(String clusterCreationTime) {
this.clusterCreationTime = clusterCreationTime;
}
/**
*
* The time when the elastic cluster was created in Universal Coordinated Time (UTC).
*
*
* @return The time when the elastic cluster was created in Universal Coordinated Time (UTC).
*/
public String getClusterCreationTime() {
return this.clusterCreationTime;
}
/**
*
* The time when the elastic cluster was created in Universal Coordinated Time (UTC).
*
*
* @param clusterCreationTime
* The time when the elastic cluster was created in Universal Coordinated Time (UTC).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withClusterCreationTime(String clusterCreationTime) {
setClusterCreationTime(clusterCreationTime);
return this;
}
/**
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of
* the ARN as the KMS encryption key. If an encryption key is not specified here, Amazon DocumentDB uses the default
* encryption key that KMS creates for your account. Your account has a different default encryption key for each
* Amazon Region.
*
*
* @param kmsKeyId
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias
* instead of the ARN as the KMS encryption key. If an encryption key is not specified here, Amazon
* DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different
* default encryption key for each Amazon Region.
*/
public void setKmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
/**
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of
* the ARN as the KMS encryption key. If an encryption key is not specified here, Amazon DocumentDB uses the default
* encryption key that KMS creates for your account. Your account has a different default encryption key for each
* Amazon Region.
*
*
* @return The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating
* a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias
* instead of the ARN as the KMS encryption key. If an encryption key is not specified here, Amazon
* DocumentDB uses the default encryption key that KMS creates for your account. Your account has a
* different default encryption key for each Amazon Region.
*/
public String getKmsKeyId() {
return this.kmsKeyId;
}
/**
*
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of
* the ARN as the KMS encryption key. If an encryption key is not specified here, Amazon DocumentDB uses the default
* encryption key that KMS creates for your account. Your account has a different default encryption key for each
* Amazon Region.
*
*
* @param kmsKeyId
* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a
* cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias
* instead of the ARN as the KMS encryption key. If an encryption key is not specified here, Amazon
* DocumentDB uses the default encryption key that KMS creates for your account. Your account has a different
* default encryption key for each Amazon Region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withKmsKeyId(String kmsKeyId) {
setKmsKeyId(kmsKeyId);
return this;
}
/**
*
* The ARN identifier of the elastic cluster snapshot.
*
*
* @param snapshotArn
* The ARN identifier of the elastic cluster snapshot.
*/
public void setSnapshotArn(String snapshotArn) {
this.snapshotArn = snapshotArn;
}
/**
*
* The ARN identifier of the elastic cluster snapshot.
*
*
* @return The ARN identifier of the elastic cluster snapshot.
*/
public String getSnapshotArn() {
return this.snapshotArn;
}
/**
*
* The ARN identifier of the elastic cluster snapshot.
*
*
* @param snapshotArn
* The ARN identifier of the elastic cluster snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withSnapshotArn(String snapshotArn) {
setSnapshotArn(snapshotArn);
return this;
}
/**
*
* The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC).
*
*
* @param snapshotCreationTime
* The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC).
*/
public void setSnapshotCreationTime(String snapshotCreationTime) {
this.snapshotCreationTime = snapshotCreationTime;
}
/**
*
* The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC).
*
*
* @return The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC).
*/
public String getSnapshotCreationTime() {
return this.snapshotCreationTime;
}
/**
*
* The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC).
*
*
* @param snapshotCreationTime
* The time when the elastic cluster snapshot was created in Universal Coordinated Time (UTC).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withSnapshotCreationTime(String snapshotCreationTime) {
setSnapshotCreationTime(snapshotCreationTime);
return this;
}
/**
*
* The name of the elastic cluster snapshot.
*
*
* @param snapshotName
* The name of the elastic cluster snapshot.
*/
public void setSnapshotName(String snapshotName) {
this.snapshotName = snapshotName;
}
/**
*
* The name of the elastic cluster snapshot.
*
*
* @return The name of the elastic cluster snapshot.
*/
public String getSnapshotName() {
return this.snapshotName;
}
/**
*
* The name of the elastic cluster snapshot.
*
*
* @param snapshotName
* The name of the elastic cluster snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withSnapshotName(String snapshotName) {
setSnapshotName(snapshotName);
return this;
}
/**
*
* The type of cluster snapshots to be returned. You can specify one of the following values:
*
*
* -
*
* automated
- Return all cluster snapshots that Amazon DocumentDB has automatically created for your
* Amazon Web Services account.
*
*
* -
*
* manual
- Return all cluster snapshots that you have manually created for your Amazon Web Services
* account.
*
*
*
*
* @param snapshotType
* The type of cluster snapshots to be returned. You can specify one of the following values:
*
* -
*
* automated
- Return all cluster snapshots that Amazon DocumentDB has automatically created for
* your Amazon Web Services account.
*
*
* -
*
* manual
- Return all cluster snapshots that you have manually created for your Amazon Web
* Services account.
*
*
* @see SnapshotType
*/
public void setSnapshotType(String snapshotType) {
this.snapshotType = snapshotType;
}
/**
*
* The type of cluster snapshots to be returned. You can specify one of the following values:
*
*
* -
*
* automated
- Return all cluster snapshots that Amazon DocumentDB has automatically created for your
* Amazon Web Services account.
*
*
* -
*
* manual
- Return all cluster snapshots that you have manually created for your Amazon Web Services
* account.
*
*
*
*
* @return The type of cluster snapshots to be returned. You can specify one of the following values:
*
* -
*
* automated
- Return all cluster snapshots that Amazon DocumentDB has automatically created
* for your Amazon Web Services account.
*
*
* -
*
* manual
- Return all cluster snapshots that you have manually created for your Amazon Web
* Services account.
*
*
* @see SnapshotType
*/
public String getSnapshotType() {
return this.snapshotType;
}
/**
*
* The type of cluster snapshots to be returned. You can specify one of the following values:
*
*
* -
*
* automated
- Return all cluster snapshots that Amazon DocumentDB has automatically created for your
* Amazon Web Services account.
*
*
* -
*
* manual
- Return all cluster snapshots that you have manually created for your Amazon Web Services
* account.
*
*
*
*
* @param snapshotType
* The type of cluster snapshots to be returned. You can specify one of the following values:
*
* -
*
* automated
- Return all cluster snapshots that Amazon DocumentDB has automatically created for
* your Amazon Web Services account.
*
*
* -
*
* manual
- Return all cluster snapshots that you have manually created for your Amazon Web
* Services account.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see SnapshotType
*/
public ClusterSnapshot withSnapshotType(String snapshotType) {
setSnapshotType(snapshotType);
return this;
}
/**
*
* The type of cluster snapshots to be returned. You can specify one of the following values:
*
*
* -
*
* automated
- Return all cluster snapshots that Amazon DocumentDB has automatically created for your
* Amazon Web Services account.
*
*
* -
*
* manual
- Return all cluster snapshots that you have manually created for your Amazon Web Services
* account.
*
*
*
*
* @param snapshotType
* The type of cluster snapshots to be returned. You can specify one of the following values:
*
* -
*
* automated
- Return all cluster snapshots that Amazon DocumentDB has automatically created for
* your Amazon Web Services account.
*
*
* -
*
* manual
- Return all cluster snapshots that you have manually created for your Amazon Web
* Services account.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see SnapshotType
*/
public ClusterSnapshot withSnapshotType(SnapshotType snapshotType) {
this.snapshotType = snapshotType.toString();
return this;
}
/**
*
* The status of the elastic cluster snapshot.
*
*
* @param status
* The status of the elastic cluster snapshot.
* @see Status
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the elastic cluster snapshot.
*
*
* @return The status of the elastic cluster snapshot.
* @see Status
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the elastic cluster snapshot.
*
*
* @param status
* The status of the elastic cluster snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Status
*/
public ClusterSnapshot withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the elastic cluster snapshot.
*
*
* @param status
* The status of the elastic cluster snapshot.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Status
*/
public ClusterSnapshot withStatus(Status status) {
this.status = status.toString();
return this;
}
/**
*
* The Amazon EC2 subnet IDs for the elastic cluster.
*
*
* @return The Amazon EC2 subnet IDs for the elastic cluster.
*/
public java.util.List getSubnetIds() {
return subnetIds;
}
/**
*
* The Amazon EC2 subnet IDs for the elastic cluster.
*
*
* @param subnetIds
* The Amazon EC2 subnet IDs for the elastic cluster.
*/
public void setSubnetIds(java.util.Collection subnetIds) {
if (subnetIds == null) {
this.subnetIds = null;
return;
}
this.subnetIds = new java.util.ArrayList(subnetIds);
}
/**
*
* The Amazon EC2 subnet IDs for the elastic cluster.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubnetIds(java.util.Collection)} or {@link #withSubnetIds(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param subnetIds
* The Amazon EC2 subnet IDs for the elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withSubnetIds(String... subnetIds) {
if (this.subnetIds == null) {
setSubnetIds(new java.util.ArrayList(subnetIds.length));
}
for (String ele : subnetIds) {
this.subnetIds.add(ele);
}
return this;
}
/**
*
* The Amazon EC2 subnet IDs for the elastic cluster.
*
*
* @param subnetIds
* The Amazon EC2 subnet IDs for the elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withSubnetIds(java.util.Collection subnetIds) {
setSubnetIds(subnetIds);
return this;
}
/**
*
* A list of EC2 VPC security groups to associate with the elastic cluster.
*
*
* @return A list of EC2 VPC security groups to associate with the elastic cluster.
*/
public java.util.List getVpcSecurityGroupIds() {
return vpcSecurityGroupIds;
}
/**
*
* A list of EC2 VPC security groups to associate with the elastic cluster.
*
*
* @param vpcSecurityGroupIds
* A list of EC2 VPC security groups to associate with the elastic cluster.
*/
public void setVpcSecurityGroupIds(java.util.Collection vpcSecurityGroupIds) {
if (vpcSecurityGroupIds == null) {
this.vpcSecurityGroupIds = null;
return;
}
this.vpcSecurityGroupIds = new java.util.ArrayList(vpcSecurityGroupIds);
}
/**
*
* A list of EC2 VPC security groups to associate with the elastic cluster.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVpcSecurityGroupIds(java.util.Collection)} or {@link #withVpcSecurityGroupIds(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param vpcSecurityGroupIds
* A list of EC2 VPC security groups to associate with the elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withVpcSecurityGroupIds(String... vpcSecurityGroupIds) {
if (this.vpcSecurityGroupIds == null) {
setVpcSecurityGroupIds(new java.util.ArrayList(vpcSecurityGroupIds.length));
}
for (String ele : vpcSecurityGroupIds) {
this.vpcSecurityGroupIds.add(ele);
}
return this;
}
/**
*
* A list of EC2 VPC security groups to associate with the elastic cluster.
*
*
* @param vpcSecurityGroupIds
* A list of EC2 VPC security groups to associate with the elastic cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClusterSnapshot withVpcSecurityGroupIds(java.util.Collection vpcSecurityGroupIds) {
setVpcSecurityGroupIds(vpcSecurityGroupIds);
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 (getAdminUserName() != null)
sb.append("AdminUserName: ").append(getAdminUserName()).append(",");
if (getClusterArn() != null)
sb.append("ClusterArn: ").append(getClusterArn()).append(",");
if (getClusterCreationTime() != null)
sb.append("ClusterCreationTime: ").append(getClusterCreationTime()).append(",");
if (getKmsKeyId() != null)
sb.append("KmsKeyId: ").append(getKmsKeyId()).append(",");
if (getSnapshotArn() != null)
sb.append("SnapshotArn: ").append(getSnapshotArn()).append(",");
if (getSnapshotCreationTime() != null)
sb.append("SnapshotCreationTime: ").append(getSnapshotCreationTime()).append(",");
if (getSnapshotName() != null)
sb.append("SnapshotName: ").append(getSnapshotName()).append(",");
if (getSnapshotType() != null)
sb.append("SnapshotType: ").append(getSnapshotType()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getSubnetIds() != null)
sb.append("SubnetIds: ").append(getSubnetIds()).append(",");
if (getVpcSecurityGroupIds() != null)
sb.append("VpcSecurityGroupIds: ").append(getVpcSecurityGroupIds());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ClusterSnapshot == false)
return false;
ClusterSnapshot other = (ClusterSnapshot) obj;
if (other.getAdminUserName() == null ^ this.getAdminUserName() == null)
return false;
if (other.getAdminUserName() != null && other.getAdminUserName().equals(this.getAdminUserName()) == false)
return false;
if (other.getClusterArn() == null ^ this.getClusterArn() == null)
return false;
if (other.getClusterArn() != null && other.getClusterArn().equals(this.getClusterArn()) == false)
return false;
if (other.getClusterCreationTime() == null ^ this.getClusterCreationTime() == null)
return false;
if (other.getClusterCreationTime() != null && other.getClusterCreationTime().equals(this.getClusterCreationTime()) == false)
return false;
if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null)
return false;
if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false)
return false;
if (other.getSnapshotArn() == null ^ this.getSnapshotArn() == null)
return false;
if (other.getSnapshotArn() != null && other.getSnapshotArn().equals(this.getSnapshotArn()) == false)
return false;
if (other.getSnapshotCreationTime() == null ^ this.getSnapshotCreationTime() == null)
return false;
if (other.getSnapshotCreationTime() != null && other.getSnapshotCreationTime().equals(this.getSnapshotCreationTime()) == false)
return false;
if (other.getSnapshotName() == null ^ this.getSnapshotName() == null)
return false;
if (other.getSnapshotName() != null && other.getSnapshotName().equals(this.getSnapshotName()) == false)
return false;
if (other.getSnapshotType() == null ^ this.getSnapshotType() == null)
return false;
if (other.getSnapshotType() != null && other.getSnapshotType().equals(this.getSnapshotType()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getSubnetIds() == null ^ this.getSubnetIds() == null)
return false;
if (other.getSubnetIds() != null && other.getSubnetIds().equals(this.getSubnetIds()) == false)
return false;
if (other.getVpcSecurityGroupIds() == null ^ this.getVpcSecurityGroupIds() == null)
return false;
if (other.getVpcSecurityGroupIds() != null && other.getVpcSecurityGroupIds().equals(this.getVpcSecurityGroupIds()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAdminUserName() == null) ? 0 : getAdminUserName().hashCode());
hashCode = prime * hashCode + ((getClusterArn() == null) ? 0 : getClusterArn().hashCode());
hashCode = prime * hashCode + ((getClusterCreationTime() == null) ? 0 : getClusterCreationTime().hashCode());
hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode());
hashCode = prime * hashCode + ((getSnapshotArn() == null) ? 0 : getSnapshotArn().hashCode());
hashCode = prime * hashCode + ((getSnapshotCreationTime() == null) ? 0 : getSnapshotCreationTime().hashCode());
hashCode = prime * hashCode + ((getSnapshotName() == null) ? 0 : getSnapshotName().hashCode());
hashCode = prime * hashCode + ((getSnapshotType() == null) ? 0 : getSnapshotType().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode());
hashCode = prime * hashCode + ((getVpcSecurityGroupIds() == null) ? 0 : getVpcSecurityGroupIds().hashCode());
return hashCode;
}
@Override
public ClusterSnapshot clone() {
try {
return (ClusterSnapshot) 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.docdbelastic.model.transform.ClusterSnapshotMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}