U Ec_?@s,ddlmZmZmZmZGdddeZdS))NamespacedClient query_params _make_path SKIP_IN_PATHc@seZdZedddZedddZedddZeddd Zed d d d Zed!d dZ eddddd"ddZ ed#ddZ edd$ddZ ed%ddZ dS)& WatcherClientNcCs0|tkrtd|jjdtdd|d|||dS)a? Acknowledges a watch, manually throttling the execution of the watch's actions. ``_ :arg watch_id: Watch ID :arg action_id: A comma-separated list of the action ids to be acked 6Empty value passed for a required argument 'watch_id'.PUT_watcherwatchZ_ackparamsheadersr ValueError transportperform_requestr)selfwatch_idZ action_idr r rC/tmp/pip-target-m1bursmm/lib/python/elasticsearch/client/watcher.py ack_watchs zWatcherClient.ack_watchcCs.|tkrtd|jjdtdd|d||dS)z Activates a currently inactive watch. ``_ :arg watch_id: Watch ID rrr r Z _activater rrrr r rrractivate_watch*s zWatcherClient.activate_watchcCs.|tkrtd|jjdtdd|d||dS)z Deactivates a currently active watch. ``_ :arg watch_id: Watch ID rrr r Z _deactivater rrrrrdeactivate_watch<s zWatcherClient.deactivate_watchcCs,|tkrtd|jjdtdd|||dS)z Removes a watch from Watcher. ``_ :arg id: Watch ID 0Empty value passed for a required argument 'id'.DELETEr r r rridr r rrr delete_watchNs zWatcherClient.delete_watchdebugcCs |jjdtdd|d|||dS)a: Forces the execution of a stored watch. ``_ :arg body: Execution control :arg id: Watch ID :arg debug: indicates whether the watch should execute in debug mode rr r Z_executer r bodyrrr)rr!rr r rrr execute_watch`s  zWatcherClient.execute_watchcCs,|tkrtd|jjdtdd|||dS)z Retrieves a watch by its ID. ``_ :arg id: Watch ID rGETr r r rrrrr get_watchss zWatcherClient.get_watchactiveZif_primary_termZ if_seq_noversioncCs.|tkrtd|jjdtdd||||dS)a Creates a new watch, or updates an existing one. ``_ :arg id: Watch ID :arg body: The watch :arg active: Specify whether the watch is in/active by default :arg if_primary_term: only update the watch if the last operation that has changed the watch has the specified primary term :arg if_seq_no: only update the watch if the last operation that has changed the watch has the specified sequence number :arg version: Explicit version number for concurrency control rrr r r r)rrr!r r rrr put_watchs zWatcherClient.put_watchcCs|jjdd||dS)z Starts Watcher if it is not already running. ``_ POSTz/_watcher/_startr rrrr r rrrstarts zWatcherClient.startZemit_stacktracescCs|jjdtdd|||dS)a Retrieves the current Watcher metrics. ``_ :arg metric: Controls what additional stat metrics should be include in the response Valid choices: _all, queued_watches, current_watches, pending_watches :arg emit_stacktraces: Emits stack traces of currently running watches r$r statsr r")rZmetricr r rrrr-s  zWatcherClient.statscCs|jjdd||dS)z Stops Watcher if it is running. ``_ r)z/_watcher/_stopr r*r+rrrstops zWatcherClient.stop)NNN)NN)NN)NN)NNNN)NN)NNN)NN)NNN)NN)__name__ __module__ __qualname__rrrrrr#r%r(r,r-r.rrrrrs(          rN)utilsrrrrrrrrrs