public ThreatDetectedByName withThreatNames(ScanThreatName... threatNames) {
        if (this.threatNames == null) {
            setThreatNames(new java.util.ArrayList<ScanThreatName>(threatNames.length));
        }
        for (ScanThreatName ele : threatNames) {
            this.threatNames.add(ele);
        }
        return this;
    }
<p>
List of identified threats with details, organized by threat name.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setThreatNames(java.util.Collection)} or {@link #withThreatNames(java.util.Collection)} if you want to
override the existing values.
</p>

@param threatNames
       List of identified threats with details, organized by threat name.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/ThreatDetectedByName.java