public GetMetricDataRequest withGroupings(Grouping... groupings) {
        java.util.ArrayList<String> groupingsCopy = new java.util.ArrayList<String>(groupings.length);
        for (Grouping value : groupings) {
            groupingsCopy.add(value.toString());
        }
        if (getGroupings() == null) {
            setGroupings(groupingsCopy);
        } else {
            getGroupings().addAll(groupingsCopy);
        }
        return this;
    }
<p>
The grouping applied to the metrics returned. For example, when results are grouped by queue, the metrics
returned are grouped by queue. The values returned apply to the metrics for each queue rather than aggregated for
all queues.
</p>
<p>
If no grouping is specified, a summary of metrics for all queues is returned.
</p>
<p>
RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to GetMetricDataV2 for
more up-to-date features.
</p>

@param groupings
       The grouping applied to the metrics returned. For example, when results are grouped by queue, the metrics
       returned are grouped by queue. The values returned apply to the metrics for each queue rather than
       aggregated for all queues.</p>
       <p>
       If no grouping is specified, a summary of metrics for all queues is returned.
       </p>
       <p>
       RoutingStepExpression is not a valid filter for GetMetricData and we recommend switching to
       GetMetricDataV2 for more up-to-date features.
@return Returns a reference to this object so that method calls can be chained together.
@see Grouping
aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/GetMetricDataRequest.java