|
23 | 23 | /* eslint no-unused-vars: 0 */
|
24 | 24 |
|
25 | 25 | const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
26 |
| -const acceptedQuerystring = ['allow_no_match', 'allow_no_jobs', 'force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'requests_per_second', 'allow_no_forecasts', 'wait_for_completion', 'lines_to_sample', 'line_merge_size_limit', 'charset', 'format', 'has_header_row', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'timestamp_field', 'timestamp_format', 'explain', 'calc_interim', 'start', 'end', 'advance_time', 'skip_time', 'duration', 'expires_in', 'max_model_memory', 'expand', 'exclude_interim', 'from', 'size', 'anomaly_score', 'sort', 'desc', 'job_id', 'partition_field_value', 'exclude_generated', 'verbose', 'allow_no_datafeeds', 'influencer_score', 'top_n', 'bucket_span', 'overall_score', 'record_score', 'include', 'include_model_definition', 'decompress_definition', 'tags', 'reset_start', 'reset_end', 'ignore_unavailable', 'allow_no_indices', 'ignore_throttled', 'expand_wildcards', 'delete_intervening_results', 'enabled'] |
27 |
| -const snakeCase = { allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs', errorTrace: 'error_trace', filterPath: 'filter_path', requestsPerSecond: 'requests_per_second', allowNoForecasts: 'allow_no_forecasts', waitForCompletion: 'wait_for_completion', linesToSample: 'lines_to_sample', lineMergeSizeLimit: 'line_merge_size_limit', hasHeaderRow: 'has_header_row', columnNames: 'column_names', shouldTrimFields: 'should_trim_fields', grokPattern: 'grok_pattern', timestampField: 'timestamp_field', timestampFormat: 'timestamp_format', calcInterim: 'calc_interim', advanceTime: 'advance_time', skipTime: 'skip_time', expiresIn: 'expires_in', maxModelMemory: 'max_model_memory', excludeInterim: 'exclude_interim', anomalyScore: 'anomaly_score', jobId: 'job_id', partitionFieldValue: 'partition_field_value', excludeGenerated: 'exclude_generated', allowNoDatafeeds: 'allow_no_datafeeds', influencerScore: 'influencer_score', topN: 'top_n', bucketSpan: 'bucket_span', overallScore: 'overall_score', recordScore: 'record_score', includeModelDefinition: 'include_model_definition', decompressDefinition: 'decompress_definition', resetStart: 'reset_start', resetEnd: 'reset_end', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', ignoreThrottled: 'ignore_throttled', expandWildcards: 'expand_wildcards', deleteInterveningResults: 'delete_intervening_results' } |
| 26 | +const acceptedQuerystring = ['allow_no_match', 'allow_no_jobs', 'force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'requests_per_second', 'allow_no_forecasts', 'wait_for_completion', 'calc_interim', 'start', 'end', 'advance_time', 'skip_time', 'duration', 'expires_in', 'max_model_memory', 'expand', 'exclude_interim', 'from', 'size', 'anomaly_score', 'sort', 'desc', 'job_id', 'partition_field_value', 'exclude_generated', 'verbose', 'allow_no_datafeeds', 'influencer_score', 'top_n', 'bucket_span', 'overall_score', 'record_score', 'include', 'include_model_definition', 'decompress_definition', 'tags', 'reset_start', 'reset_end', 'ignore_unavailable', 'allow_no_indices', 'ignore_throttled', 'expand_wildcards', 'delete_intervening_results', 'enabled'] |
| 27 | +const snakeCase = { allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs', errorTrace: 'error_trace', filterPath: 'filter_path', requestsPerSecond: 'requests_per_second', allowNoForecasts: 'allow_no_forecasts', waitForCompletion: 'wait_for_completion', calcInterim: 'calc_interim', advanceTime: 'advance_time', skipTime: 'skip_time', expiresIn: 'expires_in', maxModelMemory: 'max_model_memory', excludeInterim: 'exclude_interim', anomalyScore: 'anomaly_score', jobId: 'job_id', partitionFieldValue: 'partition_field_value', excludeGenerated: 'exclude_generated', allowNoDatafeeds: 'allow_no_datafeeds', influencerScore: 'influencer_score', topN: 'top_n', bucketSpan: 'bucket_span', overallScore: 'overall_score', recordScore: 'record_score', includeModelDefinition: 'include_model_definition', decompressDefinition: 'decompress_definition', resetStart: 'reset_start', resetEnd: 'reset_end', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', ignoreThrottled: 'ignore_throttled', expandWildcards: 'expand_wildcards', deleteInterveningResults: 'delete_intervening_results' } |
28 | 28 |
|
29 | 29 | function MlApi (transport, ConfigurationError) {
|
30 | 30 | this.transport = transport
|
@@ -475,33 +475,6 @@ MlApi.prototype.explainDataFrameAnalytics = function mlExplainDataFrameAnalytics
|
475 | 475 | return this.transport.request(request, options, callback)
|
476 | 476 | }
|
477 | 477 |
|
478 |
| -MlApi.prototype.findFileStructure = function mlFindFileStructureApi (params, options, callback) { |
479 |
| - ;[params, options, callback] = normalizeArguments(params, options, callback) |
480 |
| - |
481 |
| - // check required parameters |
482 |
| - if (params['body'] == null) { |
483 |
| - const err = new this[kConfigurationError]('Missing required parameter: body') |
484 |
| - return handleError(err, callback) |
485 |
| - } |
486 |
| - |
487 |
| - var { method, body, ...querystring } = params |
488 |
| - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) |
489 |
| - |
490 |
| - var path = '' |
491 |
| - if (method == null) method = 'POST' |
492 |
| - path = '/' + '_ml' + '/' + 'find_file_structure' |
493 |
| - |
494 |
| - // build request object |
495 |
| - const request = { |
496 |
| - method, |
497 |
| - path, |
498 |
| - bulkBody: body, |
499 |
| - querystring |
500 |
| - } |
501 |
| - |
502 |
| - return this.transport.request(request, options, callback) |
503 |
| -} |
504 |
| - |
505 | 478 | MlApi.prototype.flushJob = function mlFlushJobApi (params, options, callback) {
|
506 | 479 | ;[params, options, callback] = normalizeArguments(params, options, callback)
|
507 | 480 |
|
@@ -1832,7 +1805,6 @@ Object.defineProperties(MlApi.prototype, {
|
1832 | 1805 | estimate_model_memory: { get () { return this.estimateModelMemory } },
|
1833 | 1806 | evaluate_data_frame: { get () { return this.evaluateDataFrame } },
|
1834 | 1807 | explain_data_frame_analytics: { get () { return this.explainDataFrameAnalytics } },
|
1835 |
| - find_file_structure: { get () { return this.findFileStructure } }, |
1836 | 1808 | flush_job: { get () { return this.flushJob } },
|
1837 | 1809 | get_buckets: { get () { return this.getBuckets } },
|
1838 | 1810 | get_calendar_events: { get () { return this.getCalendarEvents } },
|
|
0 commit comments