public RulesSource withStatefulRules(StatefulRule... statefulRules) {
        if (this.statefulRules == null) {
            setStatefulRules(new java.util.ArrayList<StatefulRule>(statefulRules.length));
        }
        for (StatefulRule ele : statefulRules) {
            this.statefulRules.add(ele);
        }
        return this;
    }
<p>
An array of individual stateful rules inspection criteria to be used together in a stateful rule group. Use this
option to specify simple Suricata rules with protocol, source and destination, ports, direction, and rule
options. For information about the Suricata <code>Rules</code> format, see <a
href="https://suricata.readthedocs.io/en/suricata-6.0.9/rules/intro.html">Rules Format</a>.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setStatefulRules(java.util.Collection)} or {@link #withStatefulRules(java.util.Collection)} if you want
to override the existing values.
</p>

@param statefulRules
       An array of individual stateful rules inspection criteria to be used together in a stateful rule group.
       Use this option to specify simple Suricata rules with protocol, source and destination, ports, direction,
       and rule options. For information about the Suricata <code>Rules</code> format, see <a
       href="https://suricata.readthedocs.io/en/suricata-6.0.9/rules/intro.html">Rules Format</a>.
@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/RulesSource.java