public MetricDataQuery withMetricStat(MetricStat metricStat) {
        setMetricStat(metricStat);
        return this;
    }
<p>
The metric to be returned, along with statistics, period, and units. Use this parameter only if this object is
retrieving a metric and not performing a math expression on returned data.
</p>
<p>
Within one MetricDataQuery object, you must specify either <code>Expression</code> or <code>MetricStat</code> but
not both.
</p>

@param metricStat
       The metric to be returned, along with statistics, period, and units. Use this parameter only if this
       object is retrieving a metric and not performing a math expression on returned data.</p>
       <p>
       Within one MetricDataQuery object, you must specify either <code>Expression</code> or
       <code>MetricStat</code> but not both.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/model/MetricDataQuery.java