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

com.amazonaws.services.docdb.model.GlobalCluster Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
Show newest version
/*
 * 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.docdb.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* A data type representing an Amazon DocumentDB global cluster. *

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

* Contains a user-supplied global cluster identifier. This identifier is the unique key that identifies a global * cluster. *

*/ private String globalClusterIdentifier; /** *

* The Amazon Web Services Region-unique, immutable identifier for the global database cluster. This identifier is * found in CloudTrail log entries whenever the KMS customer master key (CMK) for the cluster is accessed. *

*/ private String globalClusterResourceId; /** *

* The Amazon Resource Name (ARN) for the global cluster. *

*/ private String globalClusterArn; /** *

* Specifies the current state of this global cluster. *

*/ private String status; /** *

* The Amazon DocumentDB database engine used by the global cluster. *

*/ private String engine; /** *

* Indicates the database engine version. *

*/ private String engineVersion; /** *

* The default database name within the new global cluster. *

*/ private String databaseName; /** *

* The storage encryption setting for the global cluster. *

*/ private Boolean storageEncrypted; /** *

* The deletion protection setting for the new global cluster. *

*/ private Boolean deletionProtection; /** *

* The list of cluster IDs for secondary clusters within the global cluster. Currently limited to one item. *

*/ private java.util.List globalClusterMembers; /** *

* Contains a user-supplied global cluster identifier. This identifier is the unique key that identifies a global * cluster. *

* * @param globalClusterIdentifier * Contains a user-supplied global cluster identifier. This identifier is the unique key that identifies a * global cluster. */ public void setGlobalClusterIdentifier(String globalClusterIdentifier) { this.globalClusterIdentifier = globalClusterIdentifier; } /** *

* Contains a user-supplied global cluster identifier. This identifier is the unique key that identifies a global * cluster. *

* * @return Contains a user-supplied global cluster identifier. This identifier is the unique key that identifies a * global cluster. */ public String getGlobalClusterIdentifier() { return this.globalClusterIdentifier; } /** *

* Contains a user-supplied global cluster identifier. This identifier is the unique key that identifies a global * cluster. *

* * @param globalClusterIdentifier * Contains a user-supplied global cluster identifier. This identifier is the unique key that identifies a * global cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public GlobalCluster withGlobalClusterIdentifier(String globalClusterIdentifier) { setGlobalClusterIdentifier(globalClusterIdentifier); return this; } /** *

* The Amazon Web Services Region-unique, immutable identifier for the global database cluster. This identifier is * found in CloudTrail log entries whenever the KMS customer master key (CMK) for the cluster is accessed. *

* * @param globalClusterResourceId * The Amazon Web Services Region-unique, immutable identifier for the global database cluster. This * identifier is found in CloudTrail log entries whenever the KMS customer master key (CMK) for the cluster * is accessed. */ public void setGlobalClusterResourceId(String globalClusterResourceId) { this.globalClusterResourceId = globalClusterResourceId; } /** *

* The Amazon Web Services Region-unique, immutable identifier for the global database cluster. This identifier is * found in CloudTrail log entries whenever the KMS customer master key (CMK) for the cluster is accessed. *

* * @return The Amazon Web Services Region-unique, immutable identifier for the global database cluster. This * identifier is found in CloudTrail log entries whenever the KMS customer master key (CMK) for the cluster * is accessed. */ public String getGlobalClusterResourceId() { return this.globalClusterResourceId; } /** *

* The Amazon Web Services Region-unique, immutable identifier for the global database cluster. This identifier is * found in CloudTrail log entries whenever the KMS customer master key (CMK) for the cluster is accessed. *

* * @param globalClusterResourceId * The Amazon Web Services Region-unique, immutable identifier for the global database cluster. This * identifier is found in CloudTrail log entries whenever the KMS customer master key (CMK) for the 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 cluster. *

* * @param globalClusterArn * The Amazon Resource Name (ARN) for the global cluster. */ public void setGlobalClusterArn(String globalClusterArn) { this.globalClusterArn = globalClusterArn; } /** *

* The Amazon Resource Name (ARN) for the global cluster. *

* * @return The Amazon Resource Name (ARN) for the global cluster. */ public String getGlobalClusterArn() { return this.globalClusterArn; } /** *

* The Amazon Resource Name (ARN) for the global cluster. *

* * @param globalClusterArn * The Amazon Resource Name (ARN) for the global cluster. * @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 cluster. *

* * @param status * Specifies the current state of this global cluster. */ public void setStatus(String status) { this.status = status; } /** *

* Specifies the current state of this global cluster. *

* * @return Specifies the current state of this global cluster. */ public String getStatus() { return this.status; } /** *

* Specifies the current state of this global cluster. *

* * @param status * Specifies the current state of this global cluster. * @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 Amazon DocumentDB database engine used by the global cluster. *

* * @param engine * The Amazon DocumentDB database engine used by the global cluster. */ public void setEngine(String engine) { this.engine = engine; } /** *

* The Amazon DocumentDB database engine used by the global cluster. *

* * @return The Amazon DocumentDB database engine used by the global cluster. */ public String getEngine() { return this.engine; } /** *

* The Amazon DocumentDB database engine used by the global cluster. *

* * @param engine * The Amazon DocumentDB database engine used by the global cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public GlobalCluster withEngine(String engine) { setEngine(engine); return this; } /** *

* Indicates the database engine version. *

* * @param engineVersion * Indicates the database engine version. */ public void setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; } /** *

* Indicates the database engine version. *

* * @return Indicates the database engine version. */ public String getEngineVersion() { return this.engineVersion; } /** *

* Indicates the database engine version. *

* * @param engineVersion * Indicates the database engine version. * @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 default database name within the new global cluster. *

* * @param databaseName * The default database name within the new global cluster. */ public void setDatabaseName(String databaseName) { this.databaseName = databaseName; } /** *

* The default database name within the new global cluster. *

* * @return The default database name within the new global cluster. */ public String getDatabaseName() { return this.databaseName; } /** *

* The default database name within the new global cluster. *

* * @param databaseName * The default database name within the new global cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public GlobalCluster withDatabaseName(String databaseName) { setDatabaseName(databaseName); return this; } /** *

* The storage encryption setting for the global cluster. *

* * @param storageEncrypted * The storage encryption setting for the global cluster. */ public void setStorageEncrypted(Boolean storageEncrypted) { this.storageEncrypted = storageEncrypted; } /** *

* The storage encryption setting for the global cluster. *

* * @return The storage encryption setting for the global cluster. */ public Boolean getStorageEncrypted() { return this.storageEncrypted; } /** *

* The storage encryption setting for the global cluster. *

* * @param storageEncrypted * The storage encryption setting for the global cluster. * @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 cluster. *

* * @return The storage encryption setting for the global cluster. */ public Boolean isStorageEncrypted() { return this.storageEncrypted; } /** *

* The deletion protection setting for the new global cluster. *

* * @param deletionProtection * The deletion protection setting for the new global cluster. */ public void setDeletionProtection(Boolean deletionProtection) { this.deletionProtection = deletionProtection; } /** *

* The deletion protection setting for the new global cluster. *

* * @return The deletion protection setting for the new global cluster. */ public Boolean getDeletionProtection() { return this.deletionProtection; } /** *

* The deletion protection setting for the new global cluster. *

* * @param deletionProtection * The deletion protection setting for the new global cluster. * @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 new global cluster. *

* * @return The deletion protection setting for the new global cluster. */ public Boolean isDeletionProtection() { return this.deletionProtection; } /** *

* The list of cluster IDs for secondary clusters within the global cluster. Currently limited to one item. *

* * @return The list of cluster IDs for secondary clusters within the global cluster. Currently limited to one item. */ public java.util.List getGlobalClusterMembers() { return globalClusterMembers; } /** *

* The list of cluster IDs for secondary clusters within the global cluster. Currently limited to one item. *

* * @param globalClusterMembers * The list of cluster IDs for secondary clusters within the global cluster. Currently limited to one item. */ public void setGlobalClusterMembers(java.util.Collection globalClusterMembers) { if (globalClusterMembers == null) { this.globalClusterMembers = null; return; } this.globalClusterMembers = new java.util.ArrayList(globalClusterMembers); } /** *

* The list of cluster IDs for secondary clusters within the global cluster. Currently limited to one item. *

*

* 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 * The list of cluster IDs for secondary clusters within the global cluster. Currently limited to one item. * @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; } /** *

* The list of cluster IDs for secondary clusters within the global cluster. Currently limited to one item. *

* * @param globalClusterMembers * The list of cluster IDs for secondary clusters within the global cluster. Currently limited to one item. * @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 (getDatabaseName() != null) sb.append("DatabaseName: ").append(getDatabaseName()).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.getDatabaseName() == null ^ this.getDatabaseName() == null) return false; if (other.getDatabaseName() != null && other.getDatabaseName().equals(this.getDatabaseName()) == 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 + ((getDatabaseName() == null) ? 0 : getDatabaseName().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); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy