Package org.elasticsearch.client.watcher
Class ExecuteWatchRequest
- java.lang.Object
-
- org.elasticsearch.client.watcher.ExecuteWatchRequest
-
- All Implemented Interfaces:
Validatable,ToXContent,ToXContentObject
public class ExecuteWatchRequest extends java.lang.Object implements Validatable, ToXContentObject
An execute watch request to execute a watch by id or inline
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExecuteWatchRequest.ActionExecutionMode-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Fields inherited from interface org.elasticsearch.client.Validatable
EMPTY
-
-
Method Summary
Modifier and Type Method Description static ExecuteWatchRequestbyId(java.lang.String id)Execute an existing watch on the clusterjava.util.Map<java.lang.String,ExecuteWatchRequest.ActionExecutionMode>getActionModes()java.lang.StringgetId()booleanignoreCondition()static ExecuteWatchRequestinline(java.lang.String watchContent)Execute an inline watchbooleanisDebug()booleanrecordExecution()voidsetActionMode(java.lang.String actionId, ExecuteWatchRequest.ActionExecutionMode actionMode)Sets the action execution mode for the give action (identified by its id).voidsetAlternativeInput(java.lang.String alternativeInput)voidsetDebug(boolean debug)voidsetIgnoreCondition(boolean ignoreCondition)voidsetRecordExecution(boolean recordExecution)voidsetTriggerData(java.lang.String data)java.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Methods inherited from interface org.elasticsearch.client.Validatable
validate
-
-
-
-
Method Detail
-
byId
public static ExecuteWatchRequest byId(java.lang.String id)
Execute an existing watch on the cluster- Parameters:
id- the id of the watch to execute
-
inline
public static ExecuteWatchRequest inline(java.lang.String watchContent)
Execute an inline watch- Parameters:
watchContent- the JSON definition of the watch
-
getId
public java.lang.String getId()
-
setIgnoreCondition
public void setIgnoreCondition(boolean ignoreCondition)
- Parameters:
ignoreCondition- set if the condition for this execution be ignored
-
ignoreCondition
public boolean ignoreCondition()
-
setRecordExecution
public void setRecordExecution(boolean recordExecution)
- Parameters:
recordExecution- Sets if this execution be recorded in the history index
-
recordExecution
public boolean recordExecution()
-
setAlternativeInput
public void setAlternativeInput(java.lang.String alternativeInput)
- Parameters:
alternativeInput- Sets the alternative input
-
setTriggerData
public void setTriggerData(java.lang.String data)
- Parameters:
data- A JSON string representing the data that should be associated with the trigger event.
-
setActionMode
public void setActionMode(java.lang.String actionId, ExecuteWatchRequest.ActionExecutionMode actionMode)Sets the action execution mode for the give action (identified by its id).- Parameters:
actionId- the action id.actionMode- the execution mode of the action.
-
getActionModes
public java.util.Map<java.lang.String,ExecuteWatchRequest.ActionExecutionMode> getActionModes()
-
setDebug
public void setDebug(boolean debug)
- Parameters:
debug- indicates whether the watch should execute in debug mode. In debug mode the returned watch record will hold the executionvars
-
isDebug
public boolean isDebug()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
-