public PutCapacityAssignmentConfigurationRequest withCapacityAssignments(CapacityAssignment... capacityAssignments) {
        if (this.capacityAssignments == null) {
            setCapacityAssignments(new java.util.ArrayList<CapacityAssignment>(capacityAssignments.length));
        }
        for (CapacityAssignment ele : capacityAssignments) {
            this.capacityAssignments.add(ele);
        }
        return this;
    }
<p>
The list of assignments for the capacity assignment configuration.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setCapacityAssignments(java.util.Collection)} or {@link #withCapacityAssignments(java.util.Collection)}
if you want to override the existing values.
</p>

@param capacityAssignments
       The list of assignments for the capacity assignment configuration.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-athena/src/main/java/com/amazonaws/services/athena/model/PutCapacityAssignmentConfigurationRequest.java