public BehaviorCriteria withConsecutiveDatapointsToAlarm(Integer consecutiveDatapointsToAlarm) {
        setConsecutiveDatapointsToAlarm(consecutiveDatapointsToAlarm);
        return this;
    }
<p>
If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs.
If not specified, the default is 1.
</p>

@param consecutiveDatapointsToAlarm
       If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm
       occurs. If not specified, the default is 1.
@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/BehaviorCriteria.java