public void setDesiredWeightsAndCapacities(java.util.Collection<DesiredWeightAndCapacity> desiredWeightsAndCapacities) {
        if (desiredWeightsAndCapacities == null) {
            this.desiredWeightsAndCapacities = null;
            return;
        }

        this.desiredWeightsAndCapacities = new java.util.ArrayList<DesiredWeightAndCapacity>(desiredWeightsAndCapacities);
    }
<p>
An object that provides new capacity and weight values for a variant.
</p>

@param desiredWeightsAndCapacities
       An object that provides new capacity and weight values for a variant.
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/UpdateEndpointWeightsAndCapacitiesRequest.java