3 ]@s,ddlmZmZmZmZGdddeZdS))NamespacedClient query_params _make_path SKIP_IN_PATHc@seZdZedddZedddZedddZeddd Zedd d Zed d dddZ edddZ edddddZ dS) RollupClientNcCs*|tkrtd|jjdtdd||dS)zE `<>`_ :arg id: The ID of the job to delete z0Empty value passed for a required argument 'id'.DELETE_rollupjob)params)r ValueError transportperform_requestr)selfidr rJ/tmp/pip-build-z81i1n8o/elasticsearch/elasticsearch/client/xpack/rollup.py delete_jobszRollupClient.delete_jobcCs|jjdtdd||dS)z `<>`_ :arg id: The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs GETrr )r )r r r)rrr rrrget_jobsszRollupClient.get_jobscCs|jjdtdd||dS)z `<>`_ :arg id: The ID of the index to check rollup capabilities on, or left blank for all jobs rrdata)r )r r r)rrr rrrget_rollup_capsszRollupClient.get_rollup_capscCs*|tkrtd|jjdt|dd|dS)z~ `<>`_ :arg index: The rollup index or index pattern to obtain rollup capabilities from. z3Empty value passed for a required argument 'index'.rrr)r )rr r r r)rindexr rrrget_rollup_index_caps*sz"RollupClient.get_rollup_index_capscCs>x ||fD]}|tkr tdq W|jjdtdd|||dS)zn `<>`_ :arg id: The ID of the job to create :arg body: The job configuration z+Empty value passed for a required argument.PUTrr )r body)rr r r r)rrrr paramrrrput_job8s  zRollupClient.put_jobZrest_total_hits_as_intZ typed_keyscCs>x ||fD]}|tkr tdq W|jjdt||d||dS)a9 `<>`_ :arg index: The indices or index-pattern(s) (containing rollup or regular data) that should be searched :arg body: The search request body :arg doc_type: The doc type inside the index :arg rest_total_hits_as_int: Indicates whether hits.total should be rendered as an integer or an object in the rest search response, default False :arg typed_keys: Specify whether aggregation and suggester names should be prefixed by their respective types in the response z+Empty value passed for a required argument.rZ_rollup_search)r r)rr r r r)rrrZdoc_typer rrrr rollup_searchGs  zRollupClient.rollup_searchcCs,|tkrtd|jjdtdd|d|dS)zD `<>`_ :arg id: The ID of the job to start z0Empty value passed for a required argument 'id'.POSTrr Z_start)r )rr r r r)rrr rrr start_job`szRollupClient.start_jobtimeoutZwait_for_completioncCs,|tkrtd|jjdtdd|d|dS)aj `<>`_ :arg id: The ID of the job to stop :arg timeout: Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. :arg wait_for_completion: True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. z0Empty value passed for a required argument 'id'.rrr _stop)r )rr r r r)rrr rrrstop_jobms zRollupClient.stop_job)N)NN)NN)N)N)NN)N)N) __name__ __module__ __qualname__rrrrrrrrr"rrrrrs        rN)utilsrrrrrrrrrs