U Ec_@s0ddlmZmZmZmZmZGdddeZdS))NamespacedClient query_params _make_path SKIP_IN_PATH _bulk_bodyc@seZdZeddddddZedddZedd d Zedd d Zeddd dZedddddZ edddZ edddddZ edddddZ edddZ eddddd d!d"d#d$d%d&dd'd(dd)d*Zed+d,d-d.d/dd0d1Zed2d3d4dd5d6Zed7d8d-d9d:d;dd?Zed-d;d@dedddZ?dS)MlClientZ allow_no_jobsforcetimeoutNcCs0|tkrtd|jjdtdd|d|||dS)a Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. ``_ :arg job_id: The name of the job to close :arg body: The URL params optionally sent in the body :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) :arg force: True if the job should be forcefully closed :arg timeout: Controls the time to wait until a job has closed. Default to 30 minutes 4Empty value passed for a required argument 'job_id'.POST_mlanomaly_detectors_closeparamsheadersbodyr ValueError transportperform_requestrselfjob_idrrrr>/tmp/pip-target-m1bursmm/lib/python/elasticsearch/client/ml.py close_jobs zMlClient.close_jobcCs,|tkrtd|jjdtdd|||dS)z Deletes a calendar. ``_ :arg calendar_id: The ID of the calendar to delete 9Empty value passed for a required argument 'calendar_id'.DELETEr calendarsrrrr calendar_idrrrrrdelete_calendar1s zMlClient.delete_calendarcCs>||fD]}|tkrtdq|jjdtdd|d|||dS)a% Deletes scheduled events from a calendar. ``_ :arg calendar_id: The ID of the calendar to modify :arg event_id: The ID of the event to remove from the calendar +Empty value passed for a required argument.rr reventsr r)rr"Zevent_idrrparamrrrdelete_calendar_eventEs  zMlClient.delete_calendar_eventcCs>||fD]}|tkrtdq|jjdtdd|d|||dS)a% Deletes anomaly detection jobs from a calendar. ``_ :arg calendar_id: The ID of the calendar to modify :arg job_id: The ID of the job to remove from the calendar r$rr rjobsr rrr"rrrr&rrrdelete_calendar_jobYs  zMlClient.delete_calendar_jobcCs,|tkrtd|jjdtdd|||dS)a Deletes an existing datafeed. ``_ :arg datafeed_id: The ID of the datafeed to delete :arg force: True if the datafeed should be forcefully deleted 9Empty value passed for a required argument 'datafeed_id'.rr datafeedsr rr datafeed_idrrrrrdelete_datafeedms  zMlClient.delete_datafeedZrequests_per_secondcCs|jjdtdd||||dS)a  Deletes expired and unused machine learning data. ``_ :arg body: deleting expired data parameters :arg job_id: The ID of the job(s) to perform expired data hygiene for :arg requests_per_second: The desired requests per second for the deletion processes. :arg timeout: How long can the underlying delete processes run until they are canceled rr Z_delete_expired_datarrrr)rrrrrrrrdelete_expired_datas zMlClient.delete_expired_datacCs,|tkrtd|jjdtdd|||dS)z Deletes a filter. ``_ :arg filter_id: The ID of the filter to delete z7Empty value passed for a required argument 'filter_id'.rr filtersr rr filter_idrrrrr delete_filters zMlClient.delete_filterZallow_no_forecastscCs0|tkrtd|jjdtdd|d|||dS)a= Deletes forecasts from a machine learning job. ``_ :arg job_id: The ID of the job from which to delete forecasts :arg forecast_id: The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all` :arg allow_no_forecasts: Whether to ignore if `_all` matches no forecasts :arg timeout: Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds r rr r _forecastr r)rrZ forecast_idrrrrrdelete_forecastszMlClient.delete_forecastZwait_for_completioncCs,|tkrtd|jjdtdd|||dS)a Deletes an existing anomaly detection job. ``_ :arg job_id: The ID of the job to delete :arg force: True if the job should be forcefully deleted :arg wait_for_completion: Should this request wait until the operation has completed before returning Default: True r rr r r rrrrrrrr delete_jobs  zMlClient.delete_jobcCs>||fD]}|tkrtdq|jjdtdd|d|||dS)a Deletes an existing model snapshot. ``_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to delete r$rr r model_snapshotsr r)rr snapshot_idrrr&rrrdelete_model_snapshots  zMlClient.delete_model_snapshotcharsetZ column_names delimiterexplainformatZ grok_patternZhas_header_rowZline_merge_size_limitZlines_to_samplequoteZshould_trim_fieldsZtimestamp_fieldZtimestamp_formatcCs4|tkrtdt|jj|}|jjdd|||dS)a Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. ``_ :arg body: The contents of the file to be analyzed :arg charset: Optional parameter to specify the character set of the file :arg column_names: Optional parameter containing a comma separated list of the column names for a delimited file :arg delimiter: Optional parameter to specify the delimiter character for a delimited file - must be a single character :arg explain: Whether to include a commentary on how the structure was derived :arg format: Optional parameter to specify the high level file format Valid choices: ndjson, xml, delimited, semi_structured_text :arg grok_pattern: Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi- structured text file :arg has_header_row: Optional parameter to specify whether a delimited file includes the column names in its first row :arg line_merge_size_limit: Maximum number of characters permitted in a single message when lines are merged to create messages. Default: 10000 :arg lines_to_sample: How many lines of the file should be included in the analysis Default: 1000 :arg quote: Optional parameter to specify the quote character for a delimited file - must be a single character :arg should_trim_fields: Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them :arg timeout: Timeout after which the analysis will be aborted Default: 25s :arg timestamp_field: Optional parameter to specify the timestamp field in the file :arg timestamp_format: Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format 2Empty value passed for a required argument 'body'.r z/_ml/find_file_structurer)rrrr serializerrrrrrrrrfind_file_structures7zMlClient.find_file_structureZ advance_timeZ calc_interimendZ skip_timestartcCs0|tkrtd|jjdtdd|d|||dS)a Forces any buffered data to be processed by the job. ``_ :arg job_id: The name of the job to flush :arg body: Flush parameters :arg advance_time: Advances time to the given value generating results and updating the model for the advanced interval :arg calc_interim: Calculates interim results for the most recent bucket or all buckets within the latency period :arg end: When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results :arg skip_time: Skips time to the given value without generating results or updating the model for the skipped interval :arg start: When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results r r r r _flushrrrrrr flush_job0s zMlClient.flush_jobdurationZ expires_inZmax_model_memorycCs.|tkrtd|jjdtdd|d||dS)a( Predicts the future behavior of a time series by using its historical behavior. ``_ :arg job_id: The ID of the job to forecast for :arg duration: The duration of the forecast :arg expires_in: The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity. :arg max_model_memory: The max memory able to be used by the forecast. Default is 20mb. r r r r r6r rr8rrrforecastNs  zMlClient.forecastZ anomaly_scoredescZexclude_interimexpandfrom_sizesortc CsJd|kr|d|d<|tkr&td|jjdtdd|dd||||d S) aU Retrieves anomaly detection job results for one or more buckets. ``_ :arg job_id: ID of the job to get bucket results from :arg body: Bucket selection details if not provided in URI :arg timestamp: The timestamp of the desired single bucket result :arg anomaly_score: Filter for the most anomalous buckets :arg desc: Set the sort direction :arg end: End time filter for buckets :arg exclude_interim: Exclude interim results :arg expand: Include anomaly records :arg from_: skips a number of buckets :arg size: specifies a max number of buckets to get :arg sort: Sort buckets by a particular field :arg start: Start time filter for buckets rNfromr r r r resultsZbucketsrpoprrrrr)rrr timestamprrrrr get_bucketses$zMlClient.get_bucketsrcCsDd|kr|d|d<|tkr&td|jjdtdd|d||dS) a. Retrieves information about the scheduled events in calendars. ``_ :arg calendar_id: The ID of the calendar containing the events :arg end: Get events before this time :arg from_: Skips a number of events :arg job_id: Get events for the job. When this option is used calendar_id must be '_all' :arg size: Specifies a max number of events to get :arg start: Get events after this time rNrQrGETr rr%r rSr!rrrget_calendar_eventss zMlClient.get_calendar_eventscCs4d|kr|d|d<|jjdtdd||||dS)a Retrieves configuration information for calendars. ``_ :arg body: The from and size parameters optionally sent in the body :arg calendar_id: The ID of the calendar to fetch :arg from_: skips a number of calendars :arg size: specifies a max number of calendars to get rNrQr r rrrTrrr)rrr"rrrrr get_calendarss  zMlClient.get_calendarsZpartition_field_valuec CsJd|kr|d|d<|tkr&td|jjdtdd|dd||||d S) a Retrieves anomaly detection job results for one or more categories. ``_ :arg job_id: The name of the job :arg body: Category selection details if not provided in URI :arg category_id: The identifier of the category definition of interest :arg from_: skips a number of categories :arg partition_field_value: Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled. :arg size: specifies a max number of categories to get rNrQr r r r rR categoriesrrS)rrrZ category_idrrrrrget_categoriess$zMlClient.get_categoriesZallow_no_datafeedscCs|jjdtdd|d||dS)a Retrieves usage information for datafeeds. ``_ :arg datafeed_id: The ID of the datafeeds stats to fetch :arg allow_no_datafeeds: Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) rWr r,_statsr r0r-rrrget_datafeed_statss  zMlClient.get_datafeed_statscCs|jjdtdd|||dS)a Retrieves configuration information for datafeeds. ``_ :arg datafeed_id: The ID of the datafeeds to fetch :arg allow_no_datafeeds: Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) rWr r,r r0r-rrr get_datafeedss  zMlClient.get_datafeedscCs2d|kr|d|d<|jjdtdd|||dS)a! Retrieves filters. ``_ :arg filter_id: The ID of the filter to fetch :arg from_: skips a number of filters :arg size: specifies a max number of filters to get rNrQrWr r2r rYr3rrr get_filterss  zMlClient.get_filtersZinfluencer_scorecCsHd|kr|d|d<|tkr&td|jjdtdd|dd|||d S) aE Retrieves anomaly detection job results for one or more influencers. ``_ :arg job_id: Identifier for the anomaly detection job :arg body: Influencer selection criteria :arg desc: whether the results should be sorted in decending order :arg end: end timestamp for the requested influencers :arg exclude_interim: Exclude interim results :arg from_: skips a number of influencers :arg influencer_score: influencer score threshold for the requested influencers :arg size: specifies a max number of influencers to get :arg sort: sort field for the requested influencers :arg start: start timestamp for the requested influencers rNrQr r r r rRZ influencersrrSrrrrget_influencers&szMlClient.get_influencerscCs|jjdtdd|d||dS)a Retrieves usage information for anomaly detection jobs. ``_ :arg job_id: The ID of the jobs stats to fetch :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) rWr r r]r r0r8rrr get_job_statsQs  zMlClient.get_job_statscCs|jjdtdd|||dS)a Retrieves configuration information for anomaly detection jobs. ``_ :arg job_id: The ID of the jobs to fetch :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) rWr r r r0r8rrrget_jobscs  zMlClient.get_jobscCsHd|kr|d|d<|tkr&td|jjdtdd|d||||dS) a Retrieves information about model snapshots. ``_ :arg job_id: The ID of the job to fetch :arg body: Model snapshot selection criteria :arg snapshot_id: The ID of the snapshot to fetch :arg desc: True if the results should be sorted in descending order :arg end: The filter 'end' query parameter :arg from_: Skips a number of documents :arg size: The default number of documents returned in queries as a string. :arg sort: Name of the field to sort on :arg start: The filter 'start' query parameter rNrQr r r r r:rrS)rrrr;rrrrrget_model_snapshotsus"zMlClient.get_model_snapshotsZ bucket_spanZ overall_scoreZtop_ncCs2|tkrtd|jjdtdd|dd|||dS)a Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs. ``_ :arg job_id: The job IDs for which to calculate overall bucket results :arg body: Overall bucket selection details if not provided in URI :arg allow_no_jobs: Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) :arg bucket_span: The span of the overall buckets. Defaults to the longest job bucket_span :arg end: Returns overall buckets with timestamps earlier than this time :arg exclude_interim: If true overall buckets that include interim buckets will be excluded :arg overall_score: Returns overall buckets with overall scores higher than this value :arg start: Returns overall buckets with timestamps after this time :arg top_n: The number of top job bucket scores to be used in the overall_score calculation r r r r rRZoverall_bucketsrrrrrrget_overall_bucketss#zMlClient.get_overall_bucketsZ record_scorecCsHd|kr|d|d<|tkr&td|jjdtdd|dd|||d S) a Retrieves anomaly records for an anomaly detection job. ``_ :arg job_id: The ID of the job :arg body: Record selection criteria :arg desc: Set the sort direction :arg end: End time filter for records :arg exclude_interim: Exclude interim results :arg from_: skips a number of records :arg record_score: Returns records with anomaly scores greater or equal than this value :arg size: specifies a max number of records to get :arg sort: Sort records by a particular field :arg start: Start time filter for records rNrQr r r r rRrecordsrrSrrrr get_recordsszMlClient.get_recordscCs|jjdd||dS)z Returns defaults and limits used by machine learning. ``_ rWz /_ml/infor rrrrrrrrinfos z MlClient.infocCs.|tkrtd|jjdtdd|d||dS)z Opens one or more anomaly detection jobs. ``_ :arg job_id: The ID of the job to open r r r r _openr rr8rrropen_jobs zMlClient.open_jobcCs>||fD]}|tkrtdq|jjdtdd|d|||dS)z Posts scheduled events in a calendar. ``_ :arg calendar_id: The ID of the calendar to modify :arg body: A list of events r$r r rr%rr)rr"rrrr&rrrpost_calendar_eventss   zMlClient.post_calendar_eventsZ reset_endZ reset_startcCsL||fD]}|tkrtdqt|jj|}|jjdtdd|d|||dS)a Sends data to an anomaly detection job for analysis. ``_ :arg job_id: The name of the job receiving the data :arg body: The data to process :arg reset_end: Optional parameter to specify the end of the bucket resetting range :arg reset_start: Optional parameter to specify the start of the bucket resetting range r$r r r _datar)rrrrrCrrrrrrrr&rrr post_data%s   zMlClient.post_datacCs.|tkrtd|jjdtdd|d||dS)z Previews a datafeed. ``_ :arg datafeed_id: The ID of the datafeed to preview r+rWr r,Z_previewr rr-rrrpreview_datafeed?s zMlClient.preview_datafeedcCs.|tkrtd|jjdtdd||||dS)z Instantiates a calendar. ``_ :arg calendar_id: The ID of the calendar to create :arg body: The calendar details rPUTr rrr)rr"rrrrrr put_calendarSs  zMlClient.put_calendarcCs>||fD]}|tkrtdq|jjdtdd|d|||dS)a Adds an anomaly detection job to a calendar. ``_ :arg calendar_id: The ID of the calendar to modify :arg job_id: The ID of the job to add to the calendar r$rrr rr(r rr)rrrput_calendar_jobis  zMlClient.put_calendar_jobZallow_no_indicesZexpand_wildcardsZignore_throttledZignore_unavailablecCs<||fD]}|tkrtdq|jjdtdd||||dS)a Instantiates a datafeed. ``_ :arg datafeed_id: The ID of the datafeed to create :arg body: The datafeed config :arg allow_no_indices: Ignore if the source indices expressions resolves to no concrete indices (default: true) :arg expand_wildcards: Whether source index expressions should get expanded to open or closed indices (default: open) Valid choices: open, closed, hidden, none, all :arg ignore_throttled: Ignore indices that are marked as throttled (default: true) :arg ignore_unavailable: Ignore unavailable indexes (default: false) r$rrr r,rrrr.rrrr&rrr put_datafeed}s   zMlClient.put_datafeedcCs<||fD]}|tkrtdq|jjdtdd||||dS)z Instantiates a filter. ``_ :arg filter_id: The ID of the filter to create :arg body: The filter details r$rrr r2rrrr4rrrr&rrr put_filters   zMlClient.put_filtercCs<||fD]}|tkrtdq|jjdtdd||||dS)z Instantiates an anomaly detection job. ``_ :arg job_id: The ID of the job to create :arg body: The job r$rrr r rrrorrrput_jobs   zMlClient.put_jobZdelete_intervening_resultsc CsB||fD]}|tkrtdq|jjdtdd|d|d|||dS)a Reverts to a specific snapshot. ``_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to revert to :arg body: Reversion options :arg delete_intervening_results: Should we reset the results back to the time of the snapshot? r$r r r r:Z_revertrrrrr;rrrr&rrrrevert_model_snapshots"  zMlClient.revert_model_snapshotZenabledcCs|jjdd||dS)a Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. ``_ :arg enabled: Whether to enable upgrade_mode ML setting or not. Defaults to false. :arg timeout: Controls the time to wait before action times out. Defaults to 30 seconds r z/_ml/set_upgrade_moder rhrirrrset_upgrade_modes zMlClient.set_upgrade_modecCs0|tkrtd|jjdtdd|d|||dS)a/ Starts one or more datafeeds. ``_ :arg datafeed_id: The ID of the datafeed to start :arg body: The start datafeed parameters :arg end: The end time when the datafeed should stop. When not set, the datafeed continues in real time :arg start: The start time from where the datafeed should begin :arg timeout: Controls the time to wait until a datafeed has started. Default to 20 seconds r+r r r,_startrr)rr.rrrrrrstart_datafeeds zMlClient.start_datafeedcCs.|tkrtd|jjdtdd|d||dS)a? Stops one or more datafeeds. ``_ :arg datafeed_id: The ID of the datafeed to stop :arg allow_no_datafeeds: Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) :arg force: True if the datafeed should be forcefully stopped. :arg timeout: Controls the time to wait until a datafeed has stopped. Default to 20 seconds r+r r r,_stopr rr-rrr stop_datafeeds zMlClient.stop_datafeedcCs>||fD]}|tkrtdq|jjdtdd|d|||dS)a Updates certain properties of a datafeed. ``_ :arg datafeed_id: The ID of the datafeed to update :arg body: The datafeed update settings :arg allow_no_indices: Ignore if the source indices expressions resolves to no concrete indices (default: true) :arg expand_wildcards: Whether source index expressions should get expanded to open or closed indices (default: open) Valid choices: open, closed, hidden, none, all :arg ignore_throttled: Ignore indices that are marked as throttled (default: true) :arg ignore_unavailable: Ignore unavailable indexes (default: false) r$r r r,_updaterrrurrrupdate_datafeed-s   zMlClient.update_datafeedcCs>||fD]}|tkrtdq|jjdtdd|d|||dS)a Updates the description of a filter, adds items, or removes items. ``_ :arg filter_id: The ID of the filter to update :arg body: The filter update r$r r r2rrrrwrrr update_filterMs   zMlClient.update_filtercCs>||fD]}|tkrtdq|jjdtdd|d|||dS)a Updates certain properties of an anomaly detection job. ``_ :arg job_id: The ID of the job to create :arg body: The job update settings r$r r r rrrrorrr update_jobbs   zMlClient.update_jobc CsD|||fD]}|tkr tdq |jjdtdd|d|d|||dS)aC Updates certain properties of a snapshot. ``_ :arg job_id: The ID of the job to fetch :arg snapshot_id: The ID of the snapshot to update :arg body: The model snapshot properties to update r$r r r r:rrrrzrrrupdate_model_snapshotws"  zMlClient.update_model_snapshotcCs&|tkrtd|jjdd|||dS)z Validates an anomaly detection job. ``_ :arg body: The job config rBr z /_ml/anomaly_detectors/_validaterrrrrrDrrrvalidateszMlClient.validatecCs&|tkrtd|jjdd|||dS)z Validates an anomaly detection detector. ``_ :arg body: The detector rBr z)/_ml/anomaly_detectors/_validate/detectorrrrDrrrvalidate_detectorszMlClient.validate_detectorcCs.|tkrtd|jjdtddd|||dS)a Deletes an existing data frame analytics job. ``_ :arg id: The ID of the data frame analytics to delete :arg force: True if the job should be forcefully deleted :arg timeout: Controls the time to wait until a job is deleted. Defaults to 1 minute 0Empty value passed for a required argument 'id'.rr data_frame analyticsr rridrrrrrdelete_data_frame_analyticss  z$MlClient.delete_data_frame_analyticscCs&|tkrtd|jjdd|||dS)z Evaluates the data frame analytics for an annotated index. ``_ :arg body: The evaluation definition rBr z/_ml/data_frame/_evaluaterrrDrrrevaluate_data_frameszMlClient.evaluate_data_frameZallow_no_matchcCs4d|kr|d|d<|jjdtddd|||dS)aZ Retrieves configuration information for data frame analytics jobs. ``_ :arg id: The ID of the data frame analytics to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) Default: True :arg from_: skips a number of analytics :arg size: specifies a max number of analytics to get Default: 100 rNrQrWr rrr rYrrrrget_data_frame_analyticss z!MlClient.get_data_frame_analyticscCs6d|kr|d|d<|jjdtddd|d||dS) a^ Retrieves usage information for data frame analytics jobs. ``_ :arg id: The ID of the data frame analytics stats to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) Default: True :arg from_: skips a number of analytics :arg size: specifies a max number of analytics to get Default: 100 rNrQrWr rrr]r rYrrrrget_data_frame_analytics_statssz'MlClient.get_data_frame_analytics_statscCs>||fD]}|tkrtdq|jjdtddd||||dS)a Instantiates a data frame analytics job. ``_ :arg id: The ID of the data frame analytics to create :arg body: The data frame analytics configuration r$rrr rrrrrrrrrr&rrrput_data_frame_analyticss   z!MlClient.put_data_frame_analyticscCs2|tkrtd|jjdtddd|d|||dS)a~ Starts a data frame analytics job. ``_ :arg id: The ID of the data frame analytics to start :arg body: The start data frame analytics parameters :arg timeout: Controls the time to wait until the task has started. Defaults to 20 seconds rr r rrr}rrrrrrrrrrstart_data_frame_analytics+s z#MlClient.start_data_frame_analyticscCs2|tkrtd|jjdtddd|d|||dS)a Stops one or more data frame analytics jobs. ``_ :arg id: The ID of the data frame analytics to stop :arg body: The stop data frame analytics parameters :arg allow_no_match: Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) :arg force: True if the data frame analytics should be forcefully stopped :arg timeout: Controls the time to wait until the task has stopped. Defaults to 20 seconds rr r rrrrrrrrrstop_data_frame_analyticsAsz"MlClient.stop_data_frame_analyticscCs,|tkrtd|jjdtdd|||dS)a Deletes an existing trained inference model that is currently not referenced by an ingest pipeline. ``_ :arg model_id: The ID of the trained model to delete z6Empty value passed for a required argument 'model_id'.rr inferencer rrmodel_idrrrrrdelete_trained_model\s  zMlClient.delete_trained_modelcCs"|jjdtddd|d|||dS)a Explains a data frame analytics config. ``_ :arg body: The data frame analytics config to explain :arg id: The ID of the data frame analytics to explain r r rrZ_explainrr0)rrrrrrrrexplain_data_frame_analyticsos z%MlClient.explain_data_frame_analyticsZdecompress_definitionZ for_exportZinclude_model_definitiontagscCs2d|kr|d|d<|jjdtdd|||dS)a Retrieves configuration information for a trained inference model. ``_ :arg model_id: The ID of the trained models to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) Default: True :arg decompress_definition: Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true. Default: True :arg for_export: Omits fields that are illegal to set on model PUT :arg from_: skips a number of trained models :arg include_model_definition: Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false. :arg size: specifies a max number of trained models to get Default: 100 :arg tags: A comma-separated list of tags that the model must have. rNrQrWr rr rYrrrrget_trained_modelss! zMlClient.get_trained_modelscCs4d|kr|d|d<|jjdtdd|d||dS)aX Retrieves usage information for trained inference models. ``_ :arg model_id: The ID of the trained models stats to fetch :arg allow_no_match: Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) Default: True :arg from_: skips a number of trained models :arg size: specifies a max number of trained models to get Default: 100 rNrQrWr rr]r rYrrrrget_trained_models_statss z!MlClient.get_trained_models_statscCs<||fD]}|tkrtdq|jjdtdd||||dS)a Creates an inference trained model. ``_ :arg model_id: The ID of the trained models to store :arg body: The trained model configuration r$rrr rrr)rrrrrr&rrrput_trained_models   zMlClient.put_trained_modelcCs&|tkrtd|jjdd|||dS)z Estimates the model memory ``_ :arg body: The analysis config, plus cardinality estimates for fields it references rBr z-/_ml/anomaly_detectors/_estimate_model_memoryrrrDrrrestimate_model_memorys zMlClient.estimate_model_memorycCs@||fD]}|tkrtdq|jjdtddd|d|||dS)a* Updates certain properties of a data frame analytics job. ``_ :arg id: The ID of the data frame analytics to update :arg body: The data frame analytics settings to update r$r r rrrrrrrrrupdate_data_frame_analyticss  z$MlClient.update_data_frame_analytics)NNN)NN)NN)NN)NN)NNNN)NN)NNN)NN)NN)NN)NNN)NN)NNNN)NN)NNNN)NNNN)NNN)NNN)NNN)NNN)NNN)NNN)NNNN)NNN)NNN)NN)NN)NN)NN)NN)NNN)NN)NN)NN)NN)NNN)NN)NNN)NN)NN)NN)NN)NN)NN)NN)NN)NN)NNN)NNN)NN)NNN)NNN)NN)NNNN)NNN)NNN)NN)NN)NN)@__name__ __module__ __qualname__rrr#r'r*r/r1r5r7r9r<rErIrKrVrXrZr\r^r_r`rarbrcrdrergrjrlrmrprqrsrtrvrxryr{r|r~rrrrrrrrrrrrrrrrrrrrrrrrrrs            3    $    "    !   $ '                                    "    rN)utilsrrrrrrrrrrs