@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); hashCode = prime * hashCode + ((getDBSnapshots() == null) ? 0 : getDBSnapshots().hashCode()); return hashCode; }
/** * <p> * A list of <a>DBSnapshot</a> instances. * </p> * * @param dBSnapshots * A list of <a>DBSnapshot</a> instances. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBSnapshotsResult withDBSnapshots(java.util.Collection<DBSnapshot> dBSnapshots) { setDBSnapshots(dBSnapshots); return this; }
/** * <p> * An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>. * </p> * * @param marker * An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBSnapshotsResult withMarker(String marker) { setMarker(marker); return this; }
public DescribeDBSnapshotsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeDBSnapshotsResult describeDBSnapshotsResult = new DescribeDBSnapshotsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeDBSnapshotsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Marker", targetDepth)) { describeDBSnapshotsResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("DBSnapshots", targetDepth)) { describeDBSnapshotsResult.withDBSnapshots(new ArrayList<DBSnapshot>()); continue; } if (context.testExpression("DBSnapshots/DBSnapshot", targetDepth)) { describeDBSnapshotsResult.withDBSnapshots(DBSnapshotStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeDBSnapshotsResult; } } } }
.withDBInstanceIdentifier(instance.getDBInstanceIdentifier()); DescribeDBSnapshotsResult snapshotsResult = client.describeDBSnapshots(snapshotsRequest); for (DBSnapshot s : snapshotsResult.getDBSnapshots()) { snapshots.add(s.getDBSnapshotIdentifier());
public DescribeDBSnapshotsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeDBSnapshotsResult describeDBSnapshotsResult = new DescribeDBSnapshotsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeDBSnapshotsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Marker", targetDepth)) { describeDBSnapshotsResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("DBSnapshots", targetDepth)) { describeDBSnapshotsResult.withDBSnapshots(new ArrayList<DBSnapshot>()); continue; } if (context.testExpression("DBSnapshots/DBSnapshot", targetDepth)) { describeDBSnapshotsResult.withDBSnapshots(DBSnapshotStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeDBSnapshotsResult; } } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeDBSnapshotsResult == false) return false; DescribeDBSnapshotsResult other = (DescribeDBSnapshotsResult) obj; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; if (other.getDBSnapshots() == null ^ this.getDBSnapshots() == null) return false; if (other.getDBSnapshots() != null && other.getDBSnapshots().equals(this.getDBSnapshots()) == false) return false; return true; }
/** * <p> * A list of <a>DBSnapshot</a> instances. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDBSnapshots(java.util.Collection)} or {@link #withDBSnapshots(java.util.Collection)} if you want to * override the existing values. * </p> * * @param dBSnapshots * A list of <a>DBSnapshot</a> instances. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBSnapshotsResult withDBSnapshots(DBSnapshot... dBSnapshots) { if (this.dBSnapshots == null) { setDBSnapshots(new com.amazonaws.internal.SdkInternalList<DBSnapshot>(dBSnapshots.length)); } for (DBSnapshot ele : dBSnapshots) { this.dBSnapshots.add(ele); } return this; }
/** * <p> * An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>. * </p> * * @param marker * An optional pagination token provided by a previous request. If this parameter is specified, the response * includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBSnapshotsResult 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 (getDBSnapshots() != null) sb.append("DBSnapshots: ").append(getDBSnapshots()); sb.append("}"); return sb.toString(); }
/** * <p> * A list of <a>DBSnapshot</a> instances. * </p> * * @param dBSnapshots * A list of <a>DBSnapshot</a> instances. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBSnapshotsResult withDBSnapshots(java.util.Collection<DBSnapshot> dBSnapshots) { setDBSnapshots(dBSnapshots); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); hashCode = prime * hashCode + ((getDBSnapshots() == null) ? 0 : getDBSnapshots().hashCode()); return hashCode; }
/** * <p> * A list of <a>DBSnapshot</a> instances. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDBSnapshots(java.util.Collection)} or {@link #withDBSnapshots(java.util.Collection)} if you want to * override the existing values. * </p> * * @param dBSnapshots * A list of <a>DBSnapshot</a> instances. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDBSnapshotsResult withDBSnapshots(DBSnapshot... dBSnapshots) { if (this.dBSnapshots == null) { setDBSnapshots(new com.amazonaws.internal.SdkInternalList<DBSnapshot>(dBSnapshots.length)); } for (DBSnapshot ele : dBSnapshots) { this.dBSnapshots.add(ele); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeDBSnapshotsResult == false) return false; DescribeDBSnapshotsResult other = (DescribeDBSnapshotsResult) obj; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; if (other.getDBSnapshots() == null ^ this.getDBSnapshots() == null) return false; if (other.getDBSnapshots() != null && other.getDBSnapshots().equals(this.getDBSnapshots()) == 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 (getDBSnapshots() != null) sb.append("DBSnapshots: ").append(getDBSnapshots()); sb.append("}"); return sb.toString(); }
do{ rslt = rdsClient.describeDBSnapshots(new DescribeDBSnapshotsRequest().withIncludePublic(false).withIncludeShared(false).withMarker(marker)); snapshotsTemp.addAll(rslt.getDBSnapshots()); marker = rslt.getMarker(); }while(marker!=null);