Class DeleteForecastRequest

All Implemented Interfaces:
Writeable, org.elasticsearch.core.RefCounted, TaskAwareRequest, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class DeleteForecastRequest extends ActionRequest implements org.elasticsearch.xcontent.ToXContentObject
POJO for a delete forecast request
  • Field Details

    • FORECAST_ID

      public static final org.elasticsearch.xcontent.ParseField FORECAST_ID
    • ALLOW_NO_FORECASTS

      public static final org.elasticsearch.xcontent.ParseField ALLOW_NO_FORECASTS
    • TIMEOUT

      public static final org.elasticsearch.xcontent.ParseField TIMEOUT
    • ALL

      public static final String ALL
      See Also:
    • PARSER

      public static final org.elasticsearch.xcontent.ConstructingObjectParser<DeleteForecastRequest,Void> PARSER
  • Constructor Details

    • DeleteForecastRequest

      public DeleteForecastRequest(String jobId)
      Create a new DeleteForecastRequest for the given Job ID
      Parameters:
      jobId - the jobId of the Job whose forecast(s) to delete
  • Method Details

    • deleteAllForecasts

      public static DeleteForecastRequest deleteAllForecasts(String jobId)
      Create a new DeleteForecastRequest that explicitly deletes all forecasts
      Parameters:
      jobId - the jobId of the Job whose forecasts to delete
    • getJobId

      public String getJobId()
    • getForecastIds

      public List<String> getForecastIds()
    • setForecastIds

      public void setForecastIds(String... forecastIds)
      The forecast IDs to delete. Can be also be ALL to explicitly delete ALL forecasts
      Parameters:
      forecastIds - forecast IDs to delete
    • getAllowNoForecasts

      public Boolean getAllowNoForecasts()
    • setAllowNoForecasts

      public void setAllowNoForecasts(boolean allowNoForecasts)
      Sets the value of "allow_no_forecasts".
      Parameters:
      allowNoForecasts - when true no error is thrown when ALL does not find any forecasts
    • timeout

      public void timeout(String timeout)
      Allows to set the timeout
      Parameters:
      timeout - timeout as a string (e.g. 1s)
    • timeout

      public void timeout(org.elasticsearch.core.TimeValue timeout)
      Allows to set the timeout
      Parameters:
      timeout - timeout as a TimeValue
    • timeout

      public org.elasticsearch.core.TimeValue timeout()
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • validate

      Specified by:
      validate in class ActionRequest
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException