Package org.elasticsearch.client.watcher
Class ExecuteWatchRequest
java.lang.Object
org.elasticsearch.client.watcher.ExecuteWatchRequest
- All Implemented Interfaces:
Validatable
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentObject
public class ExecuteWatchRequest
extends Object
implements Validatable, org.elasticsearch.xcontent.ToXContentObject
An execute watch request to execute a watch by id or inline
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
Fields inherited from interface org.elasticsearch.client.Validatable
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExecuteWatchRequest
Execute an existing watch on the clustergetId()
boolean
static ExecuteWatchRequest
Execute an inline watchboolean
isDebug()
boolean
void
setActionMode
(String actionId, ExecuteWatchRequest.ActionExecutionMode actionMode) Sets the action execution mode for the give action (identified by its id).void
setAlternativeInput
(String alternativeInput) void
setDebug
(boolean debug) void
setIgnoreCondition
(boolean ignoreCondition) void
setRecordExecution
(boolean recordExecution) void
setTriggerData
(String data) toString()
org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.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.xcontent.ToXContentObject
isFragment
Methods inherited from interface org.elasticsearch.client.Validatable
validate
-
Method Details
-
byId
Execute an existing watch on the cluster- Parameters:
id
- the id of the watch to execute
-
inline
Execute an inline watch- Parameters:
watchContent
- the JSON definition of the watch
-
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
- Parameters:
alternativeInput
- Sets the alternative input
-
setTriggerData
- Parameters:
data
- A JSON string representing the data that should be associated with the trigger event.
-
setActionMode
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
-
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
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-