public GroupingConfiguration withCriteria(String criteria) {
        setCriteria(criteria);
        return this;
    }
<p>
The criteria used for grouping Amazon Q in Connect users.
</p>
<p>
The following is the list of supported criteria values.
</p>
<ul>
<li>
<p>
<code>RoutingProfileArn</code>: Grouping the users by their <a
href="https://docs.aws.amazon.com/connect/latest/APIReference/API_RoutingProfile.html">Amazon Connect routing
profile ARN</a>. User should have <a
href="https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchRoutingProfiles.html"
>SearchRoutingProfile</a> and <a
href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeRoutingProfile.html"
>DescribeRoutingProfile</a> permissions when setting criteria to this value.
</p>
</li>
</ul>

@param criteria
       The criteria used for grouping Amazon Q in Connect users.</p>
       <p>
       The following is the list of supported criteria values.
       </p>
       <ul>
       <li>
       <p>
       <code>RoutingProfileArn</code>: Grouping the users by their <a
       href="https://docs.aws.amazon.com/connect/latest/APIReference/API_RoutingProfile.html">Amazon Connect
       routing profile ARN</a>. User should have <a
       href="https://docs.aws.amazon.com/connect/latest/APIReference/API_SearchRoutingProfiles.html"
       >SearchRoutingProfile</a> and <a
       href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeRoutingProfile.html"
       >DescribeRoutingProfile</a> permissions when setting criteria to this value.
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-qconnect/src/main/java/com/amazonaws/services/qconnect/model/GroupingConfiguration.java