public CreateInstancesRequest withAddOns(AddOnRequest... addOns) {
        if (this.addOns == null) {
            setAddOns(new java.util.ArrayList<AddOnRequest>(addOns.length));
        }
        for (AddOnRequest ele : addOns) {
            this.addOns.add(ele);
        }
        return this;
    }
<p>
An array of objects representing the add-ons to enable for the new instance.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setAddOns(java.util.Collection)} or {@link #withAddOns(java.util.Collection)} if you want to override the
existing values.
</p>

@param addOns
       An array of objects representing the add-ons to enable for the new instance.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/CreateInstancesRequest.java