public ListThingGroupsForThingResult withThingGroups(GroupNameAndArn... thingGroups) {
        if (this.thingGroups == null) {
            setThingGroups(new java.util.ArrayList<GroupNameAndArn>(thingGroups.length));
        }
        for (GroupNameAndArn ele : thingGroups) {
            this.thingGroups.add(ele);
        }
        return this;
    }
<p>
The thing groups.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setThingGroups(java.util.Collection)} or {@link #withThingGroups(java.util.Collection)} if you want to
override the existing values.
</p>

@param thingGroups
       The thing groups.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListThingGroupsForThingResult.java