public Job 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>
A list of IoT things and thing groups to which the job should be sent.
</p>
<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
       A list of IoT things and thing groups to which the job should be sent.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/Job.java