public DescribeDirectConnectGatewayAttachmentsResult withDirectConnectGatewayAttachments(DirectConnectGatewayAttachment... directConnectGatewayAttachments) {
        if (this.directConnectGatewayAttachments == null) {
            setDirectConnectGatewayAttachments(new com.amazonaws.internal.SdkInternalList<DirectConnectGatewayAttachment>(
                    directConnectGatewayAttachments.length));
        }
        for (DirectConnectGatewayAttachment ele : directConnectGatewayAttachments) {
            this.directConnectGatewayAttachments.add(ele);
        }
        return this;
    }
<p>
The attachments.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setDirectConnectGatewayAttachments(java.util.Collection)} or
{@link #withDirectConnectGatewayAttachments(java.util.Collection)} if you want to override the existing values.
</p>

@param directConnectGatewayAttachments
       The attachments.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-directconnect/src/main/java/com/amazonaws/services/directconnect/model/DescribeDirectConnectGatewayAttachmentsResult.java