public Firewall withSubnetMappings(SubnetMapping... subnetMappings) {
        if (this.subnetMappings == null) {
            setSubnetMappings(new java.util.ArrayList<SubnetMapping>(subnetMappings.length));
        }
        for (SubnetMapping ele : subnetMappings) {
            this.subnetMappings.add(ele);
        }
        return this;
    }
<p>
The public subnets that Network Firewall is using for the firewall. Each subnet must belong to a different
Availability Zone.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setSubnetMappings(java.util.Collection)} or {@link #withSubnetMappings(java.util.Collection)} if you want
to override the existing values.
</p>

@param subnetMappings
       The public subnets that Network Firewall is using for the firewall. Each subnet must belong to a different
       Availability Zone.
@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/Firewall.java