public CreateAutoPredictorRequest withForecastHorizon(Integer forecastHorizon) {
        setForecastHorizon(forecastHorizon);
        return this;
    }
<p>
The number of time-steps that the model predicts. The forecast horizon is also called the prediction length.
</p>
<p>
The maximum forecast horizon is the lesser of 500 time-steps or 1/4 of the TARGET_TIME_SERIES dataset length. If
you are retraining an existing AutoPredictor, then the maximum forecast horizon is the lesser of 500 time-steps
or 1/3 of the TARGET_TIME_SERIES dataset length.
</p>
<p>
If you are upgrading to an AutoPredictor or retraining an existing AutoPredictor, you cannot update the forecast
horizon parameter. You can meet this requirement by providing longer time-series in the dataset.
</p>

@param forecastHorizon
       The number of time-steps that the model predicts. The forecast horizon is also called the prediction
       length.</p>
       <p>
       The maximum forecast horizon is the lesser of 500 time-steps or 1/4 of the TARGET_TIME_SERIES dataset
       length. If you are retraining an existing AutoPredictor, then the maximum forecast horizon is the lesser
       of 500 time-steps or 1/3 of the TARGET_TIME_SERIES dataset length.
       </p>
       <p>
       If you are upgrading to an AutoPredictor or retraining an existing AutoPredictor, you cannot update the
       forecast horizon parameter. You can meet this requirement by providing longer time-series in the dataset.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-forecast/src/main/java/com/amazonaws/services/forecast/model/CreateAutoPredictorRequest.java