public DescribeUserGroupsResult withUserGroups(UserGroup... userGroups) {
        if (this.userGroups == null) {
            setUserGroups(new com.amazonaws.internal.SdkInternalList<UserGroup>(userGroups.length));
        }
        for (UserGroup ele : userGroups) {
            this.userGroups.add(ele);
        }
        return this;
    }
<p>
Returns a list of user groups.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setUserGroups(java.util.Collection)} or {@link #withUserGroups(java.util.Collection)} if you want to
override the existing values.
</p>

@param userGroups
       Returns a list of user groups.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-elasticache/src/main/java/com/amazonaws/services/elasticache/model/DescribeUserGroupsResult.java