public MetricCollectionType withMetric(String metric) {
        setMetric(metric);
        return this;
    }
<p>
One of the following metrics:
</p>
<ul>
<li>
<p>
<code>GroupMinSize</code>
</p>
</li>
<li>
<p>
<code>GroupMaxSize</code>
</p>
</li>
<li>
<p>
<code>GroupDesiredCapacity</code>
</p>
</li>
<li>
<p>
<code>GroupInServiceInstances</code>
</p>
</li>
<li>
<p>
<code>GroupPendingInstances</code>
</p>
</li>
<li>
<p>
<code>GroupStandbyInstances</code>
</p>
</li>
<li>
<p>
<code>GroupTerminatingInstances</code>
</p>
</li>
<li>
<p>
<code>GroupTotalInstances</code>
</p>
</li>
<li>
<p>
<code>GroupInServiceCapacity</code>
</p>
</li>
<li>
<p>
<code>GroupPendingCapacity</code>
</p>
</li>
<li>
<p>
<code>GroupStandbyCapacity</code>
</p>
</li>
<li>
<p>
<code>GroupTerminatingCapacity</code>
</p>
</li>
<li>
<p>
<code>GroupTotalCapacity</code>
</p>
</li>
<li>
<p>
<code>WarmPoolDesiredCapacity</code>
</p>
</li>
<li>
<p>
<code>WarmPoolWarmedCapacity</code>
</p>
</li>
<li>
<p>
<code>WarmPoolPendingCapacity</code>
</p>
</li>
<li>
<p>
<code>WarmPoolTerminatingCapacity</code>
</p>
</li>
<li>
<p>
<code>WarmPoolTotalCapacity</code>
</p>
</li>
<li>
<p>
<code>GroupAndWarmPoolDesiredCapacity</code>
</p>
</li>
<li>
<p>
<code>GroupAndWarmPoolTotalCapacity</code>
</p>
</li>
</ul>

@param metric
       One of the following metrics:</p>
       <ul>
       <li>
       <p>
       <code>GroupMinSize</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupMaxSize</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupDesiredCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupInServiceInstances</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupPendingInstances</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupStandbyInstances</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupTerminatingInstances</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupTotalInstances</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupInServiceCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupPendingCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupStandbyCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupTerminatingCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupTotalCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>WarmPoolDesiredCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>WarmPoolWarmedCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>WarmPoolPendingCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>WarmPoolTerminatingCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>WarmPoolTotalCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupAndWarmPoolDesiredCapacity</code>
       </p>
       </li>
       <li>
       <p>
       <code>GroupAndWarmPoolTotalCapacity</code>
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/model/MetricCollectionType.java