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

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

Go to download

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

The 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.rds.model;

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

/**
 * 

* A data type representing an Aurora global database. *

* * @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 cluster. *

*/ private String globalClusterIdentifier; /** *

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

*/ private String globalClusterResourceId; /** *

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

*/ private String globalClusterArn; /** *

* Specifies the current state of this global database cluster. *

*/ private String status; /** *

* The Aurora database engine used by the global database cluster. *

*/ private String engine; /** *

* Indicates the database engine version. *

*/ private String engineVersion; /** *

* The life cycle type for the global cluster. *

*

* For more information, see CreateGlobalCluster. *

*/ private String engineLifecycleSupport; /** *

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

*/ private String databaseName; /** *

* The storage encryption setting for the global database cluster. *

*/ private Boolean storageEncrypted; /** *

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

*/ private Boolean deletionProtection; /** *

* The list of primary and secondary clusters within the global database cluster. *

*/ private com.amazonaws.internal.SdkInternalList globalClusterMembers; /** *

* A data object containing all properties for the current state of an in-process or pending switchover or failover * process for this global cluster (Aurora global database). This object is empty unless the * SwitchoverGlobalCluster or FailoverGlobalCluster operation was called on this global * cluster. *

*/ private FailoverState failoverState; /** *

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

* * @param globalClusterIdentifier * Contains a user-supplied global database cluster identifier. This identifier is the unique key that * identifies a global database cluster. */ 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 cluster. *

* * @return Contains a user-supplied global database cluster identifier. This identifier is the unique key that * identifies a global database cluster. */ 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 cluster. *

* * @param globalClusterIdentifier * Contains a user-supplied global database cluster identifier. This identifier is the unique key that * identifies a global database 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 Amazon Web Services CloudTrail log entries whenever the Amazon Web Services KMS key for the DB cluster * is accessed. *

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

* * @return The Amazon Web Services Region-unique, immutable identifier for the global database cluster. This * identifier is found in Amazon Web Services CloudTrail log entries whenever the Amazon Web Services KMS * key for the DB 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 Amazon Web Services CloudTrail log entries whenever the Amazon Web Services KMS key for the DB cluster * is accessed. *

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

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

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

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

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

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

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

* Specifies the current state of this global database cluster. *

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

* Specifies the current state of this global database cluster. *

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

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

* The Aurora database engine used by the global database cluster. *

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

* The Aurora database engine used by the global database cluster. *

* * @param engine * The Aurora database engine used by the global database 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 life cycle type for the global cluster. *

*

* For more information, see CreateGlobalCluster. *

* * @param engineLifecycleSupport * The life cycle type for the global cluster.

*

* For more information, see CreateGlobalCluster. */ public void setEngineLifecycleSupport(String engineLifecycleSupport) { this.engineLifecycleSupport = engineLifecycleSupport; } /** *

* The life cycle type for the global cluster. *

*

* For more information, see CreateGlobalCluster. *

* * @return The life cycle type for the global cluster.

*

* For more information, see CreateGlobalCluster. */ public String getEngineLifecycleSupport() { return this.engineLifecycleSupport; } /** *

* The life cycle type for the global cluster. *

*

* For more information, see CreateGlobalCluster. *

* * @param engineLifecycleSupport * The life cycle type for the global cluster.

*

* For more information, see CreateGlobalCluster. * @return Returns a reference to this object so that method calls can be chained together. */ public GlobalCluster withEngineLifecycleSupport(String engineLifecycleSupport) { setEngineLifecycleSupport(engineLifecycleSupport); return this; } /** *

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

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

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

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

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

* * @param databaseName * The default database name within the new global database 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 database cluster. *

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

* The storage encryption setting for the global database cluster. *

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

* The storage encryption setting for the global database cluster. *

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

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

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

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

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

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

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

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

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

* The list of primary and secondary clusters within the global database cluster. *

* * @return The list of primary and secondary clusters within the global database cluster. */ public java.util.List getGlobalClusterMembers() { if (globalClusterMembers == null) { globalClusterMembers = new com.amazonaws.internal.SdkInternalList(); } return globalClusterMembers; } /** *

* The list of primary and secondary clusters within the global database cluster. *

* * @param globalClusterMembers * The list of primary and secondary clusters within the global database cluster. */ public void setGlobalClusterMembers(java.util.Collection globalClusterMembers) { if (globalClusterMembers == null) { this.globalClusterMembers = null; return; } this.globalClusterMembers = new com.amazonaws.internal.SdkInternalList(globalClusterMembers); } /** *

* The list of primary and secondary clusters within the global database cluster. *

*

* 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 primary and secondary clusters within the global database cluster. * @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 com.amazonaws.internal.SdkInternalList(globalClusterMembers.length)); } for (GlobalClusterMember ele : globalClusterMembers) { this.globalClusterMembers.add(ele); } return this; } /** *

* The list of primary and secondary clusters within the global database cluster. *

* * @param globalClusterMembers * The list of primary and secondary clusters within the global database cluster. * @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; } /** *

* A data object containing all properties for the current state of an in-process or pending switchover or failover * process for this global cluster (Aurora global database). This object is empty unless the * SwitchoverGlobalCluster or FailoverGlobalCluster operation was called on this global * cluster. *

* * @param failoverState * A data object containing all properties for the current state of an in-process or pending switchover or * failover process for this global cluster (Aurora global database). This object is empty unless the * SwitchoverGlobalCluster or FailoverGlobalCluster operation was called on this * global cluster. */ public void setFailoverState(FailoverState failoverState) { this.failoverState = failoverState; } /** *

* A data object containing all properties for the current state of an in-process or pending switchover or failover * process for this global cluster (Aurora global database). This object is empty unless the * SwitchoverGlobalCluster or FailoverGlobalCluster operation was called on this global * cluster. *

* * @return A data object containing all properties for the current state of an in-process or pending switchover or * failover process for this global cluster (Aurora global database). This object is empty unless the * SwitchoverGlobalCluster or FailoverGlobalCluster operation was called on this * global cluster. */ public FailoverState getFailoverState() { return this.failoverState; } /** *

* A data object containing all properties for the current state of an in-process or pending switchover or failover * process for this global cluster (Aurora global database). This object is empty unless the * SwitchoverGlobalCluster or FailoverGlobalCluster operation was called on this global * cluster. *

* * @param failoverState * A data object containing all properties for the current state of an in-process or pending switchover or * failover process for this global cluster (Aurora global database). This object is empty unless the * SwitchoverGlobalCluster or FailoverGlobalCluster operation was called on this * global cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public GlobalCluster withFailoverState(FailoverState failoverState) { setFailoverState(failoverState); 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 (getEngineLifecycleSupport() != null) sb.append("EngineLifecycleSupport: ").append(getEngineLifecycleSupport()).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()).append(","); if (getFailoverState() != null) sb.append("FailoverState: ").append(getFailoverState()); 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.getEngineLifecycleSupport() == null ^ this.getEngineLifecycleSupport() == null) return false; if (other.getEngineLifecycleSupport() != null && other.getEngineLifecycleSupport().equals(this.getEngineLifecycleSupport()) == 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; if (other.getFailoverState() == null ^ this.getFailoverState() == null) return false; if (other.getFailoverState() != null && other.getFailoverState().equals(this.getFailoverState()) == 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 + ((getEngineLifecycleSupport() == null) ? 0 : getEngineLifecycleSupport().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()); hashCode = prime * hashCode + ((getFailoverState() == null) ? 0 : getFailoverState().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 - 2025 Weber Informatics LLC | Privacy Policy