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

com.amazonaws.services.redshift.model.ClusterDbRevision Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
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.redshift.model;

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

/**
 * 

* Describes a ClusterDbRevision. *

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

* The unique identifier of the cluster. *

*/ private String clusterIdentifier; /** *

* A string representing the current cluster version. *

*/ private String currentDatabaseRevision; /** *

* The date on which the database revision was released. *

*/ private java.util.Date databaseRevisionReleaseDate; /** *

* A list of RevisionTarget objects, where each object describes the database revision that a cluster * can be updated to. *

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

* The unique identifier of the cluster. *

* * @param clusterIdentifier * The unique identifier of the cluster. */ public void setClusterIdentifier(String clusterIdentifier) { this.clusterIdentifier = clusterIdentifier; } /** *

* The unique identifier of the cluster. *

* * @return The unique identifier of the cluster. */ public String getClusterIdentifier() { return this.clusterIdentifier; } /** *

* The unique identifier of the cluster. *

* * @param clusterIdentifier * The unique identifier of the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterDbRevision withClusterIdentifier(String clusterIdentifier) { setClusterIdentifier(clusterIdentifier); return this; } /** *

* A string representing the current cluster version. *

* * @param currentDatabaseRevision * A string representing the current cluster version. */ public void setCurrentDatabaseRevision(String currentDatabaseRevision) { this.currentDatabaseRevision = currentDatabaseRevision; } /** *

* A string representing the current cluster version. *

* * @return A string representing the current cluster version. */ public String getCurrentDatabaseRevision() { return this.currentDatabaseRevision; } /** *

* A string representing the current cluster version. *

* * @param currentDatabaseRevision * A string representing the current cluster version. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterDbRevision withCurrentDatabaseRevision(String currentDatabaseRevision) { setCurrentDatabaseRevision(currentDatabaseRevision); return this; } /** *

* The date on which the database revision was released. *

* * @param databaseRevisionReleaseDate * The date on which the database revision was released. */ public void setDatabaseRevisionReleaseDate(java.util.Date databaseRevisionReleaseDate) { this.databaseRevisionReleaseDate = databaseRevisionReleaseDate; } /** *

* The date on which the database revision was released. *

* * @return The date on which the database revision was released. */ public java.util.Date getDatabaseRevisionReleaseDate() { return this.databaseRevisionReleaseDate; } /** *

* The date on which the database revision was released. *

* * @param databaseRevisionReleaseDate * The date on which the database revision was released. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterDbRevision withDatabaseRevisionReleaseDate(java.util.Date databaseRevisionReleaseDate) { setDatabaseRevisionReleaseDate(databaseRevisionReleaseDate); return this; } /** *

* A list of RevisionTarget objects, where each object describes the database revision that a cluster * can be updated to. *

* * @return A list of RevisionTarget objects, where each object describes the database revision that a * cluster can be updated to. */ public java.util.List getRevisionTargets() { if (revisionTargets == null) { revisionTargets = new com.amazonaws.internal.SdkInternalList(); } return revisionTargets; } /** *

* A list of RevisionTarget objects, where each object describes the database revision that a cluster * can be updated to. *

* * @param revisionTargets * A list of RevisionTarget objects, where each object describes the database revision that a * cluster can be updated to. */ public void setRevisionTargets(java.util.Collection revisionTargets) { if (revisionTargets == null) { this.revisionTargets = null; return; } this.revisionTargets = new com.amazonaws.internal.SdkInternalList(revisionTargets); } /** *

* A list of RevisionTarget objects, where each object describes the database revision that a cluster * can be updated to. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRevisionTargets(java.util.Collection)} or {@link #withRevisionTargets(java.util.Collection)} if you * want to override the existing values. *

* * @param revisionTargets * A list of RevisionTarget objects, where each object describes the database revision that a * cluster can be updated to. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterDbRevision withRevisionTargets(RevisionTarget... revisionTargets) { if (this.revisionTargets == null) { setRevisionTargets(new com.amazonaws.internal.SdkInternalList(revisionTargets.length)); } for (RevisionTarget ele : revisionTargets) { this.revisionTargets.add(ele); } return this; } /** *

* A list of RevisionTarget objects, where each object describes the database revision that a cluster * can be updated to. *

* * @param revisionTargets * A list of RevisionTarget objects, where each object describes the database revision that a * cluster can be updated to. * @return Returns a reference to this object so that method calls can be chained together. */ public ClusterDbRevision withRevisionTargets(java.util.Collection revisionTargets) { setRevisionTargets(revisionTargets); 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 (getClusterIdentifier() != null) sb.append("ClusterIdentifier: ").append(getClusterIdentifier()).append(","); if (getCurrentDatabaseRevision() != null) sb.append("CurrentDatabaseRevision: ").append(getCurrentDatabaseRevision()).append(","); if (getDatabaseRevisionReleaseDate() != null) sb.append("DatabaseRevisionReleaseDate: ").append(getDatabaseRevisionReleaseDate()).append(","); if (getRevisionTargets() != null) sb.append("RevisionTargets: ").append(getRevisionTargets()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ClusterDbRevision == false) return false; ClusterDbRevision other = (ClusterDbRevision) obj; if (other.getClusterIdentifier() == null ^ this.getClusterIdentifier() == null) return false; if (other.getClusterIdentifier() != null && other.getClusterIdentifier().equals(this.getClusterIdentifier()) == false) return false; if (other.getCurrentDatabaseRevision() == null ^ this.getCurrentDatabaseRevision() == null) return false; if (other.getCurrentDatabaseRevision() != null && other.getCurrentDatabaseRevision().equals(this.getCurrentDatabaseRevision()) == false) return false; if (other.getDatabaseRevisionReleaseDate() == null ^ this.getDatabaseRevisionReleaseDate() == null) return false; if (other.getDatabaseRevisionReleaseDate() != null && other.getDatabaseRevisionReleaseDate().equals(this.getDatabaseRevisionReleaseDate()) == false) return false; if (other.getRevisionTargets() == null ^ this.getRevisionTargets() == null) return false; if (other.getRevisionTargets() != null && other.getRevisionTargets().equals(this.getRevisionTargets()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterIdentifier() == null) ? 0 : getClusterIdentifier().hashCode()); hashCode = prime * hashCode + ((getCurrentDatabaseRevision() == null) ? 0 : getCurrentDatabaseRevision().hashCode()); hashCode = prime * hashCode + ((getDatabaseRevisionReleaseDate() == null) ? 0 : getDatabaseRevisionReleaseDate().hashCode()); hashCode = prime * hashCode + ((getRevisionTargets() == null) ? 0 : getRevisionTargets().hashCode()); return hashCode; } @Override public ClusterDbRevision clone() { try { return (ClusterDbRevision) 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