public QueryResultItem withDocumentAttributes(DocumentAttribute... documentAttributes) {
        if (this.documentAttributes == null) {
            setDocumentAttributes(new java.util.ArrayList<DocumentAttribute>(documentAttributes.length));
        }
        for (DocumentAttribute ele : documentAttributes) {
            this.documentAttributes.add(ele);
        }
        return this;
    }
<p>
An array of document fields/attributes assigned to a document in the search results. For example, the document
author (<code>_author</code>) or the source URI (<code>_source_uri</code>) of the document.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setDocumentAttributes(java.util.Collection)} or {@link #withDocumentAttributes(java.util.Collection)} if
you want to override the existing values.
</p>

@param documentAttributes
       An array of document fields/attributes assigned to a document in the search results. For example, the
       document author (<code>_author</code>) or the source URI (<code>_source_uri</code>) of the document.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-kendra/src/main/java/com/amazonaws/services/kendra/model/QueryResultItem.java