/** * <p> * A list of snapshots. Each item in the list contains detailed information about one snapshot. * </p> * * @param snapshots * A list of snapshots. Each item in the list contains detailed information about one snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSnapshotsResult withSnapshots(java.util.Collection<Snapshot> snapshots) { setSnapshots(snapshots); return this; }
/** * <p> * A list of snapshots. Each item in the list contains detailed information about one snapshot. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setSnapshots(java.util.Collection)} or {@link #withSnapshots(java.util.Collection)} if you want to * override the existing values. * </p> * * @param snapshots * A list of snapshots. Each item in the list contains detailed information about one snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSnapshotsResult withSnapshots(Snapshot... snapshots) { if (this.snapshots == null) { setSnapshots(new com.amazonaws.internal.SdkInternalList<Snapshot>(snapshots.length)); } for (Snapshot ele : snapshots) { this.snapshots.add(ele); } return this; }
/** * <p> * A list of snapshots. Each item in the list contains detailed information about one snapshot. * </p> * * @param snapshots * A list of snapshots. Each item in the list contains detailed information about one snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSnapshotsResult withSnapshots(java.util.Collection<Snapshot> snapshots) { setSnapshots(snapshots); return this; }
/** * <p> * A list of snapshots. Each item in the list contains detailed information about one snapshot. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setSnapshots(java.util.Collection)} or {@link #withSnapshots(java.util.Collection)} if you want to * override the existing values. * </p> * * @param snapshots * A list of snapshots. Each item in the list contains detailed information about one snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSnapshotsResult withSnapshots(Snapshot... snapshots) { if (this.snapshots == null) { setSnapshots(new com.amazonaws.internal.SdkInternalList<Snapshot>(snapshots.length)); } for (Snapshot ele : snapshots) { this.snapshots.add(ele); } return this; }