/** * <p> * Any VPCs attached to the internet gateway. * </p> * * @param attachments * Any VPCs attached to the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withAttachments(java.util.Collection<InternetGatewayAttachment> attachments) { setAttachments(attachments); return this; }
/** * <p> * Any VPCs attached to the internet gateway. * </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 * Any VPCs attached to the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withAttachments(InternetGatewayAttachment... attachments) { if (this.attachments == null) { setAttachments(new com.amazonaws.internal.SdkInternalList<InternetGatewayAttachment>(attachments.length)); } for (InternetGatewayAttachment ele : attachments) { this.attachments.add(ele); } return this; }
/** * Any VPCs attached to the Internet gateway. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param attachments Any VPCs attached to the Internet gateway. * * @return A reference to this updated object so that method calls can be chained * together. */ public InternetGateway withAttachments(InternetGatewayAttachment... attachments) { if (getAttachments() == null) setAttachments(new java.util.ArrayList<InternetGatewayAttachment>(attachments.length)); for (InternetGatewayAttachment value : attachments) { getAttachments().add(value); } return this; }
/** * <p> * Any VPCs attached to the internet gateway. * </p> * * @param attachments * Any VPCs attached to the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withAttachments(java.util.Collection<InternetGatewayAttachment> attachments) { setAttachments(attachments); return this; }
/** * <p> * Any VPCs attached to the internet gateway. * </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 * Any VPCs attached to the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withAttachments(InternetGatewayAttachment... attachments) { if (this.attachments == null) { setAttachments(new com.amazonaws.internal.SdkInternalList<InternetGatewayAttachment>(attachments.length)); } for (InternetGatewayAttachment ele : attachments) { this.attachments.add(ele); } return this; }