public Layer withPackages(String... packages) {
        if (this.packages == null) {
            setPackages(new com.amazonaws.internal.SdkInternalList<String>(packages.length));
        }
        for (String ele : packages) {
            this.packages.add(ele);
        }
        return this;
    }
<p>
An array of <code>Package</code> objects that describe the layer's packages.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setPackages(java.util.Collection)} or {@link #withPackages(java.util.Collection)} if you want to override
the existing values.
</p>

@param packages
       An array of <code>Package</code> objects that describe the layer's packages.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/Layer.java