Package org.elasticsearch.client.ml
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:
Writeable,ToXContent,ToXContentObject,TaskAwareRequest
public class DeleteForecastRequest extends ActionRequest implements ToXContentObject
POJO for a delete forecast request
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object> -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALLstatic ParseFieldALLOW_NO_FORECASTSstatic ParseFieldFORECAST_IDstatic ConstructingObjectParser<DeleteForecastRequest,java.lang.Void>PARSERstatic ParseFieldTIMEOUT -
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 DeleteForecastRequestdeleteAllForecasts(java.lang.String jobId)Create a newDeleteForecastRequestthat explicitly deletes all forecastsbooleanequals(java.lang.Object other)java.lang.BooleangetAllowNoForecasts()java.util.List<java.lang.String>getForecastIds()java.lang.StringgetJobId()inthashCode()voidsetAllowNoForecasts(boolean allowNoForecasts)Sets the value of "allow_no_forecasts".voidsetForecastIds(java.lang.String... forecastIds)The forecast IDs to delete.TimeValuetimeout()voidtimeout(java.lang.String timeout)Allows to set the timeoutvoidtimeout(TimeValue timeout)Allows to set the timeoutXContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)ActionRequestValidationExceptionvalidate()Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddressMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
FORECAST_ID
-
ALLOW_NO_FORECASTS
-
TIMEOUT
-
ALL
public static final java.lang.String ALL- See Also:
- Constant Field Values
-
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
Create a newDeleteForecastRequestthat 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 beALLto 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- whentrueno error is thrown whenALLdoes 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
Allows to set the timeout- Parameters:
timeout- timeout as aTimeValue
-
timeout
-
equals
public boolean equals(java.lang.Object other)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
validate
- Specified by:
validatein classActionRequest
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-