public DomainAssociation withSubDomains(SubDomain... subDomains) {
        if (this.subDomains == null) {
            setSubDomains(new java.util.ArrayList<SubDomain>(subDomains.length));
        }
        for (SubDomain ele : subDomains) {
            this.subDomains.add(ele);
        }
        return this;
    }
<p>
The subdomains for the domain association.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setSubDomains(java.util.Collection)} or {@link #withSubDomains(java.util.Collection)} if you want to
override the existing values.
</p>

@param subDomains
       The subdomains for the domain association.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/DomainAssociation.java