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;
    }
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 ; }
<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.