Class ForecastRequest.Builder

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.ml.ForecastRequest.Builder
All Implemented Interfaces:
ObjectBuilder<ForecastRequest>
Enclosing class:
ForecastRequest

public static class ForecastRequest.Builder
extends ObjectBuilderBase
implements ObjectBuilder<ForecastRequest>
Builder for ForecastRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • duration

      public final ForecastRequest.Builder duration​(@Nullable Time value)
      A period of time that indicates how far into the future to forecast. For example, 30d corresponds to 30 days. The forecast starts at the last record that was processed.

      API name: duration

    • duration

      public final ForecastRequest.Builder duration​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      A period of time that indicates how far into the future to forecast. For example, 30d corresponds to 30 days. The forecast starts at the last record that was processed.

      API name: duration

    • expiresIn

      public final ForecastRequest.Builder expiresIn​(@Nullable Time value)
      The period of time that forecast results are retained. After a forecast expires, the results are deleted. If set to a value of 0, the forecast is never automatically deleted.

      API name: expires_in

    • expiresIn

      public final ForecastRequest.Builder expiresIn​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      The period of time that forecast results are retained. After a forecast expires, the results are deleted. If set to a value of 0, the forecast is never automatically deleted.

      API name: expires_in

    • jobId

      public final ForecastRequest.Builder jobId​(java.lang.String value)
      Required - Identifier for the anomaly detection job.

      API name: job_id

    • maxModelMemory

      public final ForecastRequest.Builder maxModelMemory​(@Nullable java.lang.String value)
      The maximum memory the forecast can use. If the forecast needs to use more than the provided amount, it will spool to disk. Default is 20mb, maximum is 500mb and minimum is 1mb. If set to 40% or more of the job’s configured memory limit, it is automatically reduced to below that amount.

      API name: max_model_memory

    • build

      public ForecastRequest build()
      Builds a ForecastRequest.
      Specified by:
      build in interface ObjectBuilder<ForecastRequest>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.