public MetricQuery withFilter(java.util.Map<String, String> filter) {
        setFilter(filter);
        return this;
    }
<p>
One or more filters to apply in the request. Restrictions:
</p>
<ul>
<li>
<p>
Any number of filters by the same dimension, as specified in the <code>GroupBy</code> parameter.
</p>
</li>
<li>
<p>
A single filter for any other dimension in this dimension group.
</p>
</li>
</ul>
<note>
<p>
The <code>db.sql.db_id</code> filter isn't available for RDS for SQL Server DB instances.
</p>
</note>

@param filter
       One or more filters to apply in the request. Restrictions:</p>
       <ul>
       <li>
       <p>
       Any number of filters by the same dimension, as specified in the <code>GroupBy</code> parameter.
       </p>
       </li>
       <li>
       <p>
       A single filter for any other dimension in this dimension group.
       </p>
       </li>
       </ul>
       <note>
       <p>
       The <code>db.sql.db_id</code> filter isn't available for RDS for SQL Server DB instances.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-pi/src/main/java/com/amazonaws/services/pi/model/MetricQuery.java