public DBInstance withDomainMemberships(DomainMembership... domainMemberships) {
        if (this.domainMemberships == null) {
            setDomainMemberships(new com.amazonaws.internal.SdkInternalList<DomainMembership>(domainMemberships.length));
        }
        for (DomainMembership ele : domainMemberships) {
            this.domainMemberships.add(ele);
        }
        return this;
    }
public DBInstance withDomainMemberships ( DomainMembership ... domainMemberships ) { if ( this . domainMemberships == null ) { setDomainMemberships ( new com . amazonaws . internal . SdkInternalList < DomainMembership > ( domainMemberships . length ) ) ; } for ( DomainMembership ele : domainMemberships ) { this . domainMemberships . add ( ele ) ; } return this ; }
<p>
The Active Directory Domain membership records associated with the DB instance.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setDomainMemberships(java.util.Collection)} or {@link #withDomainMemberships(java.util.Collection)} if
you want to override the existing values.
</p>

@param domainMemberships
The Active Directory Domain membership records associated with the DB instance.
@return Returns a reference to this object so that method calls can be chained together.