public Component withVariants(java.util.Collection<ComponentVariant> variants) {
        setVariants(variants);
        return this;
    }
<p>
A list of the component's variants. A variant is a unique style configuration of a main component.
</p>

@param variants
       A list of the component's variants. A variant is a unique style configuration of a main component.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-amplifyuibuilder/src/main/java/com/amazonaws/services/amplifyuibuilder/model/Component.java