Class DeleteForecastRequest

java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.client.ml.DeleteForecastRequest
All Implemented Interfaces:
org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.common.util.concurrent.RefCounted, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, org.elasticsearch.tasks.TaskAwareRequest

public class DeleteForecastRequest
extends org.elasticsearch.action.ActionRequest
implements org.elasticsearch.common.xcontent.ToXContentObject
POJO for a delete forecast request
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest

    org.elasticsearch.transport.TransportRequest.Empty

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    org.elasticsearch.common.io.stream.Writeable.Reader<V extends java.lang.Object>, org.elasticsearch.common.io.stream.Writeable.Writer<V extends java.lang.Object>
  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String ALL  
    static org.elasticsearch.common.ParseField ALLOW_NO_FORECASTS  
    static org.elasticsearch.common.ParseField FORECAST_ID  
    static org.elasticsearch.common.xcontent.ConstructingObjectParser<DeleteForecastRequest,​java.lang.Void> PARSER  
    static org.elasticsearch.common.ParseField TIMEOUT  

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor Description
    DeleteForecastRequest​(java.lang.String jobId)
    Create a new DeleteForecastRequest for the given Job ID
  • Method Summary

    Modifier and Type Method Description
    static DeleteForecastRequest deleteAllForecasts​(java.lang.String jobId)
    Create a new DeleteForecastRequest that explicitly deletes all forecasts
    boolean equals​(java.lang.Object other)  
    java.lang.Boolean getAllowNoForecasts()  
    java.util.List<java.lang.String> getForecastIds()  
    java.lang.String getJobId()  
    int hashCode()  
    void setAllowNoForecasts​(boolean allowNoForecasts)
    Sets the value of "allow_no_forecasts".
    void setForecastIds​(java.lang.String... forecastIds)
    The forecast IDs to delete.
    org.elasticsearch.common.unit.TimeValue timeout()  
    void timeout​(java.lang.String timeout)
    Allows to set the timeout
    void timeout​(org.elasticsearch.common.unit.TimeValue timeout)
    Allows to set the timeout
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  
    org.elasticsearch.action.ActionRequestValidationException validate()  

    Methods inherited from class org.elasticsearch.action.ActionRequest

    getShouldStoreResult, writeTo

    Methods inherited from class org.elasticsearch.transport.TransportRequest

    getParentTask, setParentTask

    Methods inherited from class org.elasticsearch.transport.TransportMessage

    decRef, incRef, remoteAddress, remoteAddress, tryIncRef

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest

    createTask, getDescription, setParentTask

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject

    isFragment
  • Field Details

    • FORECAST_ID

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

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

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

      public static final java.lang.String ALL
      See Also:
      Constant Field Values
    • PARSER

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

    • DeleteForecastRequest

      public DeleteForecastRequest​(java.lang.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​(java.lang.String jobId)
      Create a new DeleteForecastRequest that explicitly deletes all forecasts
      Parameters:
      jobId - the jobId of the Job whose forecasts to delete
    • getJobId

      public java.lang.String getJobId()
    • getForecastIds

      public java.util.List<java.lang.String> getForecastIds()
    • setForecastIds

      public void setForecastIds​(java.lang.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 java.lang.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​(java.lang.String timeout)
      Allows to set the timeout
      Parameters:
      timeout - timeout as a string (e.g. 1s)
    • timeout

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

      public org.elasticsearch.common.unit.TimeValue timeout()
    • equals

      public boolean equals​(java.lang.Object other)
      Overrides:
      equals in class java.lang.Object
    • hashCode

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

      public org.elasticsearch.action.ActionRequestValidationException validate()
      Specified by:
      validate in class org.elasticsearch.action.ActionRequest
    • toXContent

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