public ListEndpointGroupsResult withEndpointGroups(EndpointGroup... endpointGroups) {
        if (this.endpointGroups == null) {
            setEndpointGroups(new java.util.ArrayList<EndpointGroup>(endpointGroups.length));
        }
        for (EndpointGroup ele : endpointGroups) {
            this.endpointGroups.add(ele);
        }
        return this;
    }
<p>
The list of the endpoint groups associated with a listener.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setEndpointGroups(java.util.Collection)} or {@link #withEndpointGroups(java.util.Collection)} if you want
to override the existing values.
</p>

@param endpointGroups
       The list of the endpoint groups associated with a listener.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-globalaccelerator/src/main/java/com/amazonaws/services/globalaccelerator/model/ListEndpointGroupsResult.java