public ListGroupsResult withGroups(GroupType... groups) {
        if (this.groups == null) {
            setGroups(new java.util.ArrayList<GroupType>(groups.length));
        }
        for (GroupType ele : groups) {
            this.groups.add(ele);
        }
        return this;
    }
<p>
The group objects for the groups.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setGroups(java.util.Collection)} or {@link #withGroups(java.util.Collection)} if you want to override the
existing values.
</p>

@param groups
       The group objects for the groups.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-cognitoidp/src/main/java/com/amazonaws/services/cognitoidp/model/ListGroupsResult.java