public FirewallPolicy withStatefulRuleGroupReferences(StatefulRuleGroupReference... statefulRuleGroupReferences) {
        if (this.statefulRuleGroupReferences == null) {
            setStatefulRuleGroupReferences(new java.util.ArrayList<StatefulRuleGroupReference>(statefulRuleGroupReferences.length));
        }
        for (StatefulRuleGroupReference ele : statefulRuleGroupReferences) {
            this.statefulRuleGroupReferences.add(ele);
        }
        return this;
    }
<p>
References to the stateful rule groups that are used in the policy. These define the inspection criteria in
stateful rules.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setStatefulRuleGroupReferences(java.util.Collection)} or
{@link #withStatefulRuleGroupReferences(java.util.Collection)} if you want to override the existing values.
</p>

@param statefulRuleGroupReferences
       References to the stateful rule groups that are used in the policy. These define the inspection criteria
       in stateful rules.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-networkfirewall/src/main/java/com/amazonaws/services/networkfirewall/model/FirewallPolicy.java