public QueryResultItem withType(String type) {
        setType(type);
        return this;
    }
<p>
The type of document within the response. For example, a response could include a question-answer that's relevant
to the query.
</p>

@param type
       The type of document within the response. For example, a response could include a question-answer that's
       relevant to the query.
@return Returns a reference to this object so that method calls can be chained together.
@see QueryResultType
aws-java-sdk-kendra/src/main/java/com/amazonaws/services/kendra/model/QueryResultItem.java