public RulesSourceList withTargets(String... targets) {
        if (this.targets == null) {
            setTargets(new java.util.ArrayList<String>(targets.length));
        }
        for (String ele : targets) {
            this.targets.add(ele);
        }
        return this;
    }
<p>
The domains that you want to inspect for in your traffic flows. Valid domain specifications are the following:
</p>
<ul>
<li>
<p>
Explicit names. For example, <code>abc.example.com</code> matches only the domain <code>abc.example.com</code>.
</p>
</li>
<li>
<p>
Names that use a domain wildcard, which you indicate with an initial '<code>.</code>'. For example,
<code>.example.com</code> matches <code>example.com</code> and matches all subdomains of <code>example.com</code>
, such as <code>abc.example.com</code> and <code>www.example.com</code>.
</p>
</li>
</ul>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setTargets(java.util.Collection)} or {@link #withTargets(java.util.Collection)} if you want to override
the existing values.
</p>

@param targets
       The domains that you want to inspect for in your traffic flows. Valid domain specifications are the
       following:</p>
       <ul>
       <li>
       <p>
       Explicit names. For example, <code>abc.example.com</code> matches only the domain
       <code>abc.example.com</code>.
       </p>
       </li>
       <li>
       <p>
       Names that use a domain wildcard, which you indicate with an initial '<code>.</code>'. For example,
       <code>.example.com</code> matches <code>example.com</code> and matches all subdomains of
       <code>example.com</code>, such as <code>abc.example.com</code> and <code>www.example.com</code>.
       </p>
       </li>
@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/RulesSourceList.java