/** * <p> * Information about the volume attachments. * </p> * * @param attachments * Information about the volume attachments. * @return Returns a reference to this object so that method calls can be chained together. */ public Volume withAttachments(java.util.Collection<VolumeAttachment> attachments) { setAttachments(attachments); return this; }
/** * <p> * Information about the volume attachments. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setAttachments(java.util.Collection)} or {@link #withAttachments(java.util.Collection)} if you want to * override the existing values. * </p> * * @param attachments * Information about the volume attachments. * @return Returns a reference to this object so that method calls can be chained together. */ public Volume withAttachments(VolumeAttachment... attachments) { if (this.attachments == null) { setAttachments(new com.amazonaws.internal.SdkInternalList<VolumeAttachment>(attachments.length)); } for (VolumeAttachment ele : attachments) { this.attachments.add(ele); } return this; }
/** * Information about the volume attachments. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param attachments Information about the volume attachments. * * @return A reference to this updated object so that method calls can be chained * together. */ public Volume withAttachments(VolumeAttachment... attachments) { if (getAttachments() == null) setAttachments(new java.util.ArrayList<VolumeAttachment>(attachments.length)); for (VolumeAttachment value : attachments) { getAttachments().add(value); } return this; }
/** * <p> * Information about the volume attachments. * </p> * * @param attachments * Information about the volume attachments. * @return Returns a reference to this object so that method calls can be chained together. */ public Volume withAttachments(java.util.Collection<VolumeAttachment> attachments) { setAttachments(attachments); return this; }
/** * <p> * Information about the volume attachments. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setAttachments(java.util.Collection)} or {@link #withAttachments(java.util.Collection)} if you want to * override the existing values. * </p> * * @param attachments * Information about the volume attachments. * @return Returns a reference to this object so that method calls can be chained together. */ public Volume withAttachments(VolumeAttachment... attachments) { if (this.attachments == null) { setAttachments(new com.amazonaws.internal.SdkInternalList<VolumeAttachment>(attachments.length)); } for (VolumeAttachment ele : attachments) { this.attachments.add(ele); } return this; }