public RetrieveAndGenerateConfiguration withExternalSourcesConfiguration(ExternalSourcesRetrieveAndGenerateConfiguration externalSourcesConfiguration) {
        setExternalSourcesConfiguration(externalSourcesConfiguration);
        return this;
    }
<p>
The configuration used with the external source wrapper object in the retrieveAndGenerate function.
</p>

@param externalSourcesConfiguration
       The configuration used with the external source wrapper object in the retrieveAndGenerate function.
@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/RetrieveAndGenerateConfiguration.java