public QueryResult withWarnings(java.util.Collection<Warning> warnings) {
        setWarnings(warnings);
        return this;
    }
<p>
A list of warning codes and their messages on problems with your query.
</p>
<p>
Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in the
query. For examples of invalid query syntax, see <a
href="https://docs.aws.amazon.com/kendra/latest/dg/searching-example.html#searching-index-query-syntax">Searching
with advanced query syntax</a>.
</p>

@param warnings
       A list of warning codes and their messages on problems with your query.</p>
       <p>
       Amazon Kendra currently only supports one type of warning, which is a warning on invalid syntax used in
       the query. For examples of invalid query syntax, see <a
       href="https://docs.aws.amazon.com/kendra/latest/dg/searching-example.html#searching-index-query-syntax"
       >Searching with advanced query syntax</a>.
@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/QueryResult.java