public Job withTargetSelection(String targetSelection) {
        setTargetSelection(targetSelection);
        return this;
    }
<p>
Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified
as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is
detected in a target. For example, a job will run on a device when the thing representing the device is added to
a target group, even after the job was completed by all things originally in the group.
</p>
<note>
<p>
We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using
continuous jobs, devices that join the group receive the job execution even after the job has been created.
</p>
</note>

@param targetSelection
       Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things
       specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing
       when a change is detected in a target. For example, a job will run on a device when the thing representing
       the device is added to a target group, even after the job was completed by all things originally in the
       group. </p> <note>
       <p>
       We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By
       using continuous jobs, devices that join the group receive the job execution even after the job has been
       created.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
@see TargetSelection
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/Job.java