@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); hashCode = prime * hashCode + ((getDBClusters() == null) ? 0 : getDBClusters().hashCode()); return hashCode; }
/** * <p> * Contains a list of DB clusters for the user. * </p> * * @param dBClusters * Contains a list of DB clusters for the user. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBClustersResult withDBClusters(java.util.Collection<DBCluster> dBClusters) { setDBClusters(dBClusters); return this; }
/** * <p> * A pagination token that can be used in a subsequent DescribeDBClusters request. * </p> * * @param marker * A pagination token that can be used in a subsequent DescribeDBClusters request. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBClustersResult withMarker(String marker) { setMarker(marker); return this; }
DescribeDBClustersResult dir = rds.describeDBClusters(new DescribeDBClustersRequest() .withDBClusterIdentifier(dbClusterIdentifier)); DBCluster dbCluster = dir.getDBClusters().get(0);
public DescribeDBClustersResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeDBClustersResult describeDBClustersResult = new DescribeDBClustersResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeDBClustersResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Marker", targetDepth)) { describeDBClustersResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("DBClusters", targetDepth)) { describeDBClustersResult.withDBClusters(new ArrayList<DBCluster>()); continue; } if (context.testExpression("DBClusters/DBCluster", targetDepth)) { describeDBClustersResult.withDBClusters(DBClusterStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeDBClustersResult; } } } }
public DescribeDBClustersResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeDBClustersResult describeDBClustersResult = new DescribeDBClustersResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeDBClustersResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Marker", targetDepth)) { describeDBClustersResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("DBClusters", targetDepth)) { describeDBClustersResult.withDBClusters(new ArrayList<DBCluster>()); continue; } if (context.testExpression("DBClusters/DBCluster", targetDepth)) { describeDBClustersResult.withDBClusters(DBClusterStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeDBClustersResult; } } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeDBClustersResult == false) return false; DescribeDBClustersResult other = (DescribeDBClustersResult) obj; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; if (other.getDBClusters() == null ^ this.getDBClusters() == null) return false; if (other.getDBClusters() != null && other.getDBClusters().equals(this.getDBClusters()) == false) return false; return true; }
/** * <p> * Contains a list of DB clusters for the user. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDBClusters(java.util.Collection)} or {@link #withDBClusters(java.util.Collection)} if you want to * override the existing values. * </p> * * @param dBClusters * Contains a list of DB clusters for the user. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBClustersResult withDBClusters(DBCluster... dBClusters) { if (this.dBClusters == null) { setDBClusters(new com.amazonaws.internal.SdkInternalList<DBCluster>(dBClusters.length)); } for (DBCluster ele : dBClusters) { this.dBClusters.add(ele); } return this; }
/** * <p> * A pagination token that can be used in a subsequent DescribeDBClusters request. * </p> * * @param marker * A pagination token that can be used in a subsequent DescribeDBClusters request. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBClustersResult withMarker(String marker) { setMarker(marker); 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 (getMarker() != null) sb.append("Marker: ").append(getMarker()).append(","); if (getDBClusters() != null) sb.append("DBClusters: ").append(getDBClusters()); sb.append("}"); return sb.toString(); }
/** * <p> * Contains a list of DB clusters for the user. * </p> * * @param dBClusters * Contains a list of DB clusters for the user. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBClustersResult withDBClusters(java.util.Collection<DBCluster> dBClusters) { setDBClusters(dBClusters); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); hashCode = prime * hashCode + ((getDBClusters() == null) ? 0 : getDBClusters().hashCode()); return hashCode; }
/** * <p> * Contains a list of DB clusters for the user. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDBClusters(java.util.Collection)} or {@link #withDBClusters(java.util.Collection)} if you want to * override the existing values. * </p> * * @param dBClusters * Contains a list of DB clusters for the user. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBClustersResult withDBClusters(DBCluster... dBClusters) { if (this.dBClusters == null) { setDBClusters(new com.amazonaws.internal.SdkInternalList<DBCluster>(dBClusters.length)); } for (DBCluster ele : dBClusters) { this.dBClusters.add(ele); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeDBClustersResult == false) return false; DescribeDBClustersResult other = (DescribeDBClustersResult) obj; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; if (other.getDBClusters() == null ^ this.getDBClusters() == null) return false; if (other.getDBClusters() != null && other.getDBClusters().equals(this.getDBClusters()) == false) return false; return true; }
/** * 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 (getMarker() != null) sb.append("Marker: ").append(getMarker()).append(","); if (getDBClusters() != null) sb.append("DBClusters: ").append(getDBClusters()); sb.append("}"); return sb.toString(); }
do{ rslt = rdsClient.describeDBClusters( new DescribeDBClustersRequest().withMarker(nextMarker)); List<DBCluster> rdsListTemp = rslt.getDBClusters(); for(DBCluster cluster : rdsListTemp){ DBClusterVH vh = new DBClusterVH(cluster,rdsClient.listTagsForResource(new ListTagsForResourceRequest(). rdsList.add(vh); nextMarker = rslt.getMarker(); }while(nextMarker!=null);
log.debug("Performing RDS request: {}", dbClustersRequest); clustersResult = client.describeDBClusters(dbClustersRequest); final List<DBCluster> clusters = clustersResult.getDBClusters(); log.debug("Found {} DB clusters", clusters.size()); for (DBCluster cluster : clusters) { dbClustersRequest.setMarker(clustersResult.getMarker()); } while (clustersResult.getMarker() != null);