public AwsRdsDbInstanceDetails withOptionGroupMemberships(AwsRdsDbOptionGroupMembership... optionGroupMemberships) {
        if (this.optionGroupMemberships == null) {
            setOptionGroupMemberships(new java.util.ArrayList<AwsRdsDbOptionGroupMembership>(optionGroupMemberships.length));
        }
        for (AwsRdsDbOptionGroupMembership ele : optionGroupMemberships) {
            this.optionGroupMemberships.add(ele);
        }
        return this;
    }
<p>
The list of option group memberships for this DB instance.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setOptionGroupMemberships(java.util.Collection)} or
{@link #withOptionGroupMemberships(java.util.Collection)} if you want to override the existing values.
</p>

@param optionGroupMemberships
       The list of option group memberships for this DB instance.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsRdsDbInstanceDetails.java