public CreatePromptRequest withVariants(java.util.Collection<PromptVariant> variants) {
        setVariants(variants);
        return this;
    }
<p>
A list of objects, each containing details about a variant of the prompt.
</p>

@param variants
       A list of objects, each containing details about a variant of the prompt.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-bedrockagent/src/main/java/com/amazonaws/services/bedrockagent/model/CreatePromptRequest.java