public RetrieveAndGenerateConfiguration withType(RetrieveAndGenerateType type) {
        this.type = type.toString();
        return this;
    }
<p>
The type of resource that is queried by the request.
</p>

@param type
       The type of resource that is queried by the request.
@return Returns a reference to this object so that method calls can be chained together.
@see RetrieveAndGenerateType
aws-java-sdk-bedrockagentruntime/src/main/java/com/amazonaws/services/bedrockagentruntime/model/RetrieveAndGenerateConfiguration.java