public void setTargets(java.util.Collection<Target> targets) {
        if (targets == null) {
            this.targets = null;
            return;
        }

        this.targets = new java.util.ArrayList<Target>(targets);
    }
<p>
The targets to update or add to the rule.
</p>

@param targets
       The targets to update or add to the rule.
aws-java-sdk-eventbridge/src/main/java/com/amazonaws/services/eventbridge/model/PutTargetsRequest.java