public GroupMembers withMemberGroups(MemberGroup... memberGroups) {
        if (this.memberGroups == null) {
            setMemberGroups(new java.util.ArrayList<MemberGroup>(memberGroups.length));
        }
        for (MemberGroup ele : memberGroups) {
            this.memberGroups.add(ele);
        }
        return this;
    }
<p>
A list of sub groups that belong to a group. For example, the sub groups "Research", "Engineering", and
"Sales and Marketing" all belong to the group "Company".
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setMemberGroups(java.util.Collection)} or {@link #withMemberGroups(java.util.Collection)} if you want to
override the existing values.
</p>

@param memberGroups
       A list of sub groups that belong to a group. For example, the sub groups "Research", "Engineering", and
       "Sales and Marketing" all belong to the group "Company".
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-qbusiness/src/main/java/com/amazonaws/services/qbusiness/model/GroupMembers.java