public WorkerCapabilities withAmounts(WorkerAmountCapability... amounts) {
        if (this.amounts == null) {
            setAmounts(new java.util.ArrayList<WorkerAmountCapability>(amounts.length));
        }
        for (WorkerAmountCapability ele : amounts) {
            this.amounts.add(ele);
        }
        return this;
    }
<p>
The worker capabilities amounts on a list of worker capabilities.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setAmounts(java.util.Collection)} or {@link #withAmounts(java.util.Collection)} if you want to override
the existing values.
</p>

@param amounts
       The worker capabilities amounts on a list of worker capabilities.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-deadline/src/main/java/com/amazonaws/services/deadline/model/WorkerCapabilities.java