public GetDiscoveredResourceCountsResult withResourceCounts(ResourceCount... resourceCounts) {
        if (this.resourceCounts == null) {
            setResourceCounts(new com.amazonaws.internal.SdkInternalList<ResourceCount>(resourceCounts.length));
        }
        for (ResourceCount ele : resourceCounts) {
            this.resourceCounts.add(ele);
        }
        return this;
    }
public GetDiscoveredResourceCountsResult withResourceCounts ( ResourceCount ... resourceCounts ) { if ( this . resourceCounts == null ) { setResourceCounts ( new com . amazonaws . internal . SdkInternalList < ResourceCount > ( resourceCounts . length ) ) ; } for ( ResourceCount ele : resourceCounts ) { this . resourceCounts . add ( ele ) ; } return this ; }
<p>
The list of <code>ResourceCount</code> objects. Each object is listed in descending order by the number of
resources.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setResourceCounts(java.util.Collection)} or {@link #withResourceCounts(java.util.Collection)} if you want
to override the existing values.
</p>

@param resourceCounts
The list of <code>ResourceCount</code> objects. Each object is listed in descending order by the number of
resources.
@return Returns a reference to this object so that method calls can be chained together.