public GlobalReplicationGroup withGlobalNodeGroups(GlobalNodeGroup... globalNodeGroups) {
        if (this.globalNodeGroups == null) {
            setGlobalNodeGroups(new com.amazonaws.internal.SdkInternalList<GlobalNodeGroup>(globalNodeGroups.length));
        }
        for (GlobalNodeGroup ele : globalNodeGroups) {
            this.globalNodeGroups.add(ele);
        }
        return this;
    }
<p>
Indicates the slot configuration and global identifier for each slice group.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setGlobalNodeGroups(java.util.Collection)} or {@link #withGlobalNodeGroups(java.util.Collection)} if you
want to override the existing values.
</p>

@param globalNodeGroups
       Indicates the slot configuration and global identifier for each slice group.
@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/GlobalReplicationGroup.java