public RetrieveAndGenerateInput withText(String text) {
        setText(text);
        return this;
    }
<p>
The query made to the knowledge base.
</p>

@param text
       The query made to the knowledge base.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-bedrockagentruntime/src/main/java/com/amazonaws/services/bedrockagentruntime/model/RetrieveAndGenerateInput.java