com.amazonaws.services.neptune.model.GlobalCluster Maven / Gradle / Ivy
Show all versions of aws-java-sdk-neptune 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.neptune.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Contains the details of an Amazon Neptune global database.
*
*
* This data type is used as a response element for the CreateGlobalCluster, DescribeGlobalClusters,
* ModifyGlobalCluster, DeleteGlobalCluster, FailoverGlobalCluster, and
* RemoveFromGlobalCluster actions.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GlobalCluster implements Serializable, Cloneable {
/**
*
* Contains a user-supplied global database cluster identifier. This identifier is the unique key that identifies a
* global database.
*
*/
private String globalClusterIdentifier;
/**
*
* An immutable identifier for the global database that is unique within in all regions. This identifier is found in
* CloudTrail log entries whenever the KMS key for the DB cluster is accessed.
*
*/
private String globalClusterResourceId;
/**
*
* The Amazon Resource Name (ARN) for the global database.
*
*/
private String globalClusterArn;
/**
*
* Specifies the current state of this global database.
*
*/
private String status;
/**
*
* The Neptune database engine used by the global database ("neptune"
).
*
*/
private String engine;
/**
*
* The Neptune engine version used by the global database.
*
*/
private String engineVersion;
/**
*
* The storage encryption setting for the global database.
*
*/
private Boolean storageEncrypted;
/**
*
* The deletion protection setting for the global database.
*
*/
private Boolean deletionProtection;
/**
*
* A list of cluster ARNs and instance ARNs for all the DB clusters that are part of the global database.
*
*/
private java.util.List globalClusterMembers;
/**
*
* Contains a user-supplied global database cluster identifier. This identifier is the unique key that identifies a
* global database.
*
*
* @param globalClusterIdentifier
* Contains a user-supplied global database cluster identifier. This identifier is the unique key that
* identifies a global database.
*/
public void setGlobalClusterIdentifier(String globalClusterIdentifier) {
this.globalClusterIdentifier = globalClusterIdentifier;
}
/**
*
* Contains a user-supplied global database cluster identifier. This identifier is the unique key that identifies a
* global database.
*
*
* @return Contains a user-supplied global database cluster identifier. This identifier is the unique key that
* identifies a global database.
*/
public String getGlobalClusterIdentifier() {
return this.globalClusterIdentifier;
}
/**
*
* Contains a user-supplied global database cluster identifier. This identifier is the unique key that identifies a
* global database.
*
*
* @param globalClusterIdentifier
* Contains a user-supplied global database cluster identifier. This identifier is the unique key that
* identifies a global database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withGlobalClusterIdentifier(String globalClusterIdentifier) {
setGlobalClusterIdentifier(globalClusterIdentifier);
return this;
}
/**
*
* An immutable identifier for the global database that is unique within in all regions. This identifier is found in
* CloudTrail log entries whenever the KMS key for the DB cluster is accessed.
*
*
* @param globalClusterResourceId
* An immutable identifier for the global database that is unique within in all regions. This identifier is
* found in CloudTrail log entries whenever the KMS key for the DB cluster is accessed.
*/
public void setGlobalClusterResourceId(String globalClusterResourceId) {
this.globalClusterResourceId = globalClusterResourceId;
}
/**
*
* An immutable identifier for the global database that is unique within in all regions. This identifier is found in
* CloudTrail log entries whenever the KMS key for the DB cluster is accessed.
*
*
* @return An immutable identifier for the global database that is unique within in all regions. This identifier is
* found in CloudTrail log entries whenever the KMS key for the DB cluster is accessed.
*/
public String getGlobalClusterResourceId() {
return this.globalClusterResourceId;
}
/**
*
* An immutable identifier for the global database that is unique within in all regions. This identifier is found in
* CloudTrail log entries whenever the KMS key for the DB cluster is accessed.
*
*
* @param globalClusterResourceId
* An immutable identifier for the global database that is unique within in all regions. This identifier is
* found in CloudTrail log entries whenever the KMS key for the DB cluster is accessed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withGlobalClusterResourceId(String globalClusterResourceId) {
setGlobalClusterResourceId(globalClusterResourceId);
return this;
}
/**
*
* The Amazon Resource Name (ARN) for the global database.
*
*
* @param globalClusterArn
* The Amazon Resource Name (ARN) for the global database.
*/
public void setGlobalClusterArn(String globalClusterArn) {
this.globalClusterArn = globalClusterArn;
}
/**
*
* The Amazon Resource Name (ARN) for the global database.
*
*
* @return The Amazon Resource Name (ARN) for the global database.
*/
public String getGlobalClusterArn() {
return this.globalClusterArn;
}
/**
*
* The Amazon Resource Name (ARN) for the global database.
*
*
* @param globalClusterArn
* The Amazon Resource Name (ARN) for the global database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withGlobalClusterArn(String globalClusterArn) {
setGlobalClusterArn(globalClusterArn);
return this;
}
/**
*
* Specifies the current state of this global database.
*
*
* @param status
* Specifies the current state of this global database.
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* Specifies the current state of this global database.
*
*
* @return Specifies the current state of this global database.
*/
public String getStatus() {
return this.status;
}
/**
*
* Specifies the current state of this global database.
*
*
* @param status
* Specifies the current state of this global database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The Neptune database engine used by the global database ("neptune"
).
*
*
* @param engine
* The Neptune database engine used by the global database ("neptune"
).
*/
public void setEngine(String engine) {
this.engine = engine;
}
/**
*
* The Neptune database engine used by the global database ("neptune"
).
*
*
* @return The Neptune database engine used by the global database ("neptune"
).
*/
public String getEngine() {
return this.engine;
}
/**
*
* The Neptune database engine used by the global database ("neptune"
).
*
*
* @param engine
* The Neptune database engine used by the global database ("neptune"
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withEngine(String engine) {
setEngine(engine);
return this;
}
/**
*
* The Neptune engine version used by the global database.
*
*
* @param engineVersion
* The Neptune engine version used by the global database.
*/
public void setEngineVersion(String engineVersion) {
this.engineVersion = engineVersion;
}
/**
*
* The Neptune engine version used by the global database.
*
*
* @return The Neptune engine version used by the global database.
*/
public String getEngineVersion() {
return this.engineVersion;
}
/**
*
* The Neptune engine version used by the global database.
*
*
* @param engineVersion
* The Neptune engine version used by the global database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withEngineVersion(String engineVersion) {
setEngineVersion(engineVersion);
return this;
}
/**
*
* The storage encryption setting for the global database.
*
*
* @param storageEncrypted
* The storage encryption setting for the global database.
*/
public void setStorageEncrypted(Boolean storageEncrypted) {
this.storageEncrypted = storageEncrypted;
}
/**
*
* The storage encryption setting for the global database.
*
*
* @return The storage encryption setting for the global database.
*/
public Boolean getStorageEncrypted() {
return this.storageEncrypted;
}
/**
*
* The storage encryption setting for the global database.
*
*
* @param storageEncrypted
* The storage encryption setting for the global database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withStorageEncrypted(Boolean storageEncrypted) {
setStorageEncrypted(storageEncrypted);
return this;
}
/**
*
* The storage encryption setting for the global database.
*
*
* @return The storage encryption setting for the global database.
*/
public Boolean isStorageEncrypted() {
return this.storageEncrypted;
}
/**
*
* The deletion protection setting for the global database.
*
*
* @param deletionProtection
* The deletion protection setting for the global database.
*/
public void setDeletionProtection(Boolean deletionProtection) {
this.deletionProtection = deletionProtection;
}
/**
*
* The deletion protection setting for the global database.
*
*
* @return The deletion protection setting for the global database.
*/
public Boolean getDeletionProtection() {
return this.deletionProtection;
}
/**
*
* The deletion protection setting for the global database.
*
*
* @param deletionProtection
* The deletion protection setting for the global database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withDeletionProtection(Boolean deletionProtection) {
setDeletionProtection(deletionProtection);
return this;
}
/**
*
* The deletion protection setting for the global database.
*
*
* @return The deletion protection setting for the global database.
*/
public Boolean isDeletionProtection() {
return this.deletionProtection;
}
/**
*
* A list of cluster ARNs and instance ARNs for all the DB clusters that are part of the global database.
*
*
* @return A list of cluster ARNs and instance ARNs for all the DB clusters that are part of the global database.
*/
public java.util.List getGlobalClusterMembers() {
return globalClusterMembers;
}
/**
*
* A list of cluster ARNs and instance ARNs for all the DB clusters that are part of the global database.
*
*
* @param globalClusterMembers
* A list of cluster ARNs and instance ARNs for all the DB clusters that are part of the global database.
*/
public void setGlobalClusterMembers(java.util.Collection globalClusterMembers) {
if (globalClusterMembers == null) {
this.globalClusterMembers = null;
return;
}
this.globalClusterMembers = new java.util.ArrayList(globalClusterMembers);
}
/**
*
* A list of cluster ARNs and instance ARNs for all the DB clusters that are part of the global database.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setGlobalClusterMembers(java.util.Collection)} or {@link #withGlobalClusterMembers(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param globalClusterMembers
* A list of cluster ARNs and instance ARNs for all the DB clusters that are part of the global database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withGlobalClusterMembers(GlobalClusterMember... globalClusterMembers) {
if (this.globalClusterMembers == null) {
setGlobalClusterMembers(new java.util.ArrayList(globalClusterMembers.length));
}
for (GlobalClusterMember ele : globalClusterMembers) {
this.globalClusterMembers.add(ele);
}
return this;
}
/**
*
* A list of cluster ARNs and instance ARNs for all the DB clusters that are part of the global database.
*
*
* @param globalClusterMembers
* A list of cluster ARNs and instance ARNs for all the DB clusters that are part of the global database.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GlobalCluster withGlobalClusterMembers(java.util.Collection globalClusterMembers) {
setGlobalClusterMembers(globalClusterMembers);
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 (getGlobalClusterIdentifier() != null)
sb.append("GlobalClusterIdentifier: ").append(getGlobalClusterIdentifier()).append(",");
if (getGlobalClusterResourceId() != null)
sb.append("GlobalClusterResourceId: ").append(getGlobalClusterResourceId()).append(",");
if (getGlobalClusterArn() != null)
sb.append("GlobalClusterArn: ").append(getGlobalClusterArn()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getEngine() != null)
sb.append("Engine: ").append(getEngine()).append(",");
if (getEngineVersion() != null)
sb.append("EngineVersion: ").append(getEngineVersion()).append(",");
if (getStorageEncrypted() != null)
sb.append("StorageEncrypted: ").append(getStorageEncrypted()).append(",");
if (getDeletionProtection() != null)
sb.append("DeletionProtection: ").append(getDeletionProtection()).append(",");
if (getGlobalClusterMembers() != null)
sb.append("GlobalClusterMembers: ").append(getGlobalClusterMembers());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GlobalCluster == false)
return false;
GlobalCluster other = (GlobalCluster) obj;
if (other.getGlobalClusterIdentifier() == null ^ this.getGlobalClusterIdentifier() == null)
return false;
if (other.getGlobalClusterIdentifier() != null && other.getGlobalClusterIdentifier().equals(this.getGlobalClusterIdentifier()) == false)
return false;
if (other.getGlobalClusterResourceId() == null ^ this.getGlobalClusterResourceId() == null)
return false;
if (other.getGlobalClusterResourceId() != null && other.getGlobalClusterResourceId().equals(this.getGlobalClusterResourceId()) == false)
return false;
if (other.getGlobalClusterArn() == null ^ this.getGlobalClusterArn() == null)
return false;
if (other.getGlobalClusterArn() != null && other.getGlobalClusterArn().equals(this.getGlobalClusterArn()) == 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.getEngine() == null ^ this.getEngine() == null)
return false;
if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == false)
return false;
if (other.getEngineVersion() == null ^ this.getEngineVersion() == null)
return false;
if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false)
return false;
if (other.getStorageEncrypted() == null ^ this.getStorageEncrypted() == null)
return false;
if (other.getStorageEncrypted() != null && other.getStorageEncrypted().equals(this.getStorageEncrypted()) == false)
return false;
if (other.getDeletionProtection() == null ^ this.getDeletionProtection() == null)
return false;
if (other.getDeletionProtection() != null && other.getDeletionProtection().equals(this.getDeletionProtection()) == false)
return false;
if (other.getGlobalClusterMembers() == null ^ this.getGlobalClusterMembers() == null)
return false;
if (other.getGlobalClusterMembers() != null && other.getGlobalClusterMembers().equals(this.getGlobalClusterMembers()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getGlobalClusterIdentifier() == null) ? 0 : getGlobalClusterIdentifier().hashCode());
hashCode = prime * hashCode + ((getGlobalClusterResourceId() == null) ? 0 : getGlobalClusterResourceId().hashCode());
hashCode = prime * hashCode + ((getGlobalClusterArn() == null) ? 0 : getGlobalClusterArn().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode());
hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode());
hashCode = prime * hashCode + ((getStorageEncrypted() == null) ? 0 : getStorageEncrypted().hashCode());
hashCode = prime * hashCode + ((getDeletionProtection() == null) ? 0 : getDeletionProtection().hashCode());
hashCode = prime * hashCode + ((getGlobalClusterMembers() == null) ? 0 : getGlobalClusterMembers().hashCode());
return hashCode;
}
@Override
public GlobalCluster clone() {
try {
return (GlobalCluster) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}