public ListEndpointsByPlatformApplicationResult withEndpoints(Endpoint... endpoints) {
        if (this.endpoints == null) {
            setEndpoints(new com.amazonaws.internal.SdkInternalList<Endpoint>(endpoints.length));
        }
        for (Endpoint ele : endpoints) {
            this.endpoints.add(ele);
        }
        return this;
    }
public ListEndpointsByPlatformApplicationResult withEndpoints ( Endpoint ... endpoints ) { if ( this . endpoints == null ) { setEndpoints ( new com . amazonaws . internal . SdkInternalList < Endpoint > ( endpoints . length ) ) ; } for ( Endpoint ele : endpoints ) { this . endpoints . add ( ele ) ; } return this ; }
<p>
Endpoints returned for ListEndpointsByPlatformApplication action.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setEndpoints(java.util.Collection)} or {@link #withEndpoints(java.util.Collection)} if you want to
override the existing values.
</p>

@param endpoints
Endpoints returned for ListEndpointsByPlatformApplication action.
@return Returns a reference to this object so that method calls can be chained together.