public AnomalySourceDetails withCloudWatchMetrics(CloudWatchMetricsDetail... cloudWatchMetrics) {
        if (this.cloudWatchMetrics == null) {
            setCloudWatchMetrics(new java.util.ArrayList<CloudWatchMetricsDetail>(cloudWatchMetrics.length));
        }
        for (CloudWatchMetricsDetail ele : cloudWatchMetrics) {
            this.cloudWatchMetrics.add(ele);
        }
        return this;
    }
<p>
An array of <code>CloudWatchMetricsDetail</code> objects that contain information about analyzed CloudWatch
metrics that show anomalous behavior.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setCloudWatchMetrics(java.util.Collection)} or {@link #withCloudWatchMetrics(java.util.Collection)} if
you want to override the existing values.
</p>

@param cloudWatchMetrics
       An array of <code>CloudWatchMetricsDetail</code> objects that contain information about analyzed
       CloudWatch metrics that show anomalous behavior.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-devopsguru/src/main/java/com/amazonaws/services/devopsguru/model/AnomalySourceDetails.java