public GetFindingStatisticsResult withCountsByGroup(GroupCount... countsByGroup) {
        if (this.countsByGroup == null) {
            setCountsByGroup(new java.util.ArrayList<GroupCount>(countsByGroup.length));
        }
        for (GroupCount ele : countsByGroup) {
            this.countsByGroup.add(ele);
        }
        return this;
    }
<p>
An array of objects, one for each group of findings that matches the filter criteria specified in the request.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setCountsByGroup(java.util.Collection)} or {@link #withCountsByGroup(java.util.Collection)} if you want
to override the existing values.
</p>

@param countsByGroup
       An array of objects, one for each group of findings that matches the filter criteria specified in the
       request.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-macie2/src/main/java/com/amazonaws/services/macie2/model/GetFindingStatisticsResult.java