public CustomizedLoadMetricSpecification withDimensions(MetricDimension... dimensions) {
        if (this.dimensions == null) {
            setDimensions(new java.util.ArrayList<MetricDimension>(dimensions.length));
        }
        for (MetricDimension ele : dimensions) {
            this.dimensions.add(ele);
        }
        return this;
    }
<p>
The dimensions of the metric.
</p>
<p>
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your
customized load metric specification.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setDimensions(java.util.Collection)} or {@link #withDimensions(java.util.Collection)} if you want to
override the existing values.
</p>

@param dimensions
       The dimensions of the metric.</p>
       <p>
       Conditional: If you published your metric with dimensions, you must specify the same dimensions in your
       customized load metric specification.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-autoscalingplans/src/main/java/com/amazonaws/services/autoscalingplans/model/CustomizedLoadMetricSpecification.java