From 7b21f92cebd6047345d01d8b83ceab0eb180bd41 Mon Sep 17 00:00:00 2001 From: delvedor Date: Fri, 19 Feb 2021 08:32:33 +0100 Subject: [PATCH] API generation --- api/api/async_search.js | 22 +- api/api/autoscaling.js | 24 +- api/api/bulk.js | 8 +- api/api/cat.js | 100 +++---- api/api/ccr.js | 80 +++--- api/api/clear_scroll.js | 4 +- api/api/close_point_in_time.js | 4 +- api/api/cluster.js | 72 ++--- api/api/count.js | 6 +- api/api/create.js | 10 +- api/api/dangling_indices.js | 16 +- api/api/delete.js | 8 +- api/api/delete_by_query.js | 10 +- api/api/delete_by_query_rethrottle.js | 8 +- api/api/delete_script.js | 6 +- api/api/enrich.js | 28 +- api/api/eql.js | 26 +- api/api/exists.js | 8 +- api/api/exists_source.js | 12 +- api/api/explain.js | 8 +- api/api/field_caps.js | 4 +- api/api/get.js | 8 +- api/api/get_script.js | 6 +- api/api/get_script_context.js | 4 +- api/api/get_script_languages.js | 4 +- api/api/get_source.js | 8 +- api/api/graph.js | 8 +- api/api/ilm.js | 52 ++-- api/api/index.js | 8 +- api/api/indices.js | 324 ++++++++++----------- api/api/info.js | 4 +- api/api/ingest.js | 28 +- api/api/license.js | 28 +- api/api/logstash.js | 20 +- api/api/mget.js | 8 +- api/api/migration.js | 4 +- api/api/ml.js | 392 +++++++++++++------------- api/api/monitoring.js | 6 +- api/api/msearch.js | 8 +- api/api/msearch_template.js | 8 +- api/api/mtermvectors.js | 6 +- api/api/nodes.js | 20 +- api/api/open_point_in_time.js | 4 +- api/api/ping.js | 4 +- api/api/put_script.js | 10 +- api/api/rank_eval.js | 6 +- api/api/reindex.js | 6 +- api/api/reindex_rethrottle.js | 8 +- api/api/render_search_template.js | 4 +- api/api/rollup.js | 62 ++-- api/api/scripts_painless_execute.js | 4 +- api/api/scroll.js | 4 +- api/api/search.js | 6 +- api/api/search_shards.js | 4 +- api/api/search_template.js | 8 +- api/api/searchable_snapshots.js | 26 +- api/api/security.js | 170 +++++------ api/api/slm.js | 42 +-- api/api/snapshot.js | 96 +++---- api/api/sql.js | 18 +- api/api/ssl.js | 4 +- api/api/tasks.js | 14 +- api/api/termvectors.js | 6 +- api/api/text_structure.js | 6 +- api/api/transform.js | 50 ++-- api/api/update.js | 10 +- api/api/update_by_query.js | 8 +- api/api/update_by_query_rethrottle.js | 8 +- api/api/watcher.js | 58 ++-- api/api/xpack.js | 8 +- 70 files changed, 1036 insertions(+), 1036 deletions(-) diff --git a/api/api/async_search.js b/api/api/async_search.js index d7f719305..86a68e30a 100644 --- a/api/api/async_search.js +++ b/api/api/async_search.js @@ -35,15 +35,15 @@ AsyncSearchApi.prototype.delete = function asyncSearchDeleteApi (params, options ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_async_search' + '/' + encodeURIComponent(id) @@ -62,15 +62,15 @@ AsyncSearchApi.prototype.get = function asyncSearchGetApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_async_search' + '/' + encodeURIComponent(id) @@ -89,15 +89,15 @@ AsyncSearchApi.prototype.status = function asyncSearchStatusApi (params, options ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_async_search' + '/' + 'status' + '/' + encodeURIComponent(id) @@ -115,10 +115,10 @@ AsyncSearchApi.prototype.status = function asyncSearchStatusApi (params, options AsyncSearchApi.prototype.submit = function asyncSearchSubmitApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_async_search' diff --git a/api/api/autoscaling.js b/api/api/autoscaling.js index 622fcd2e8..47785cd5f 100644 --- a/api/api/autoscaling.js +++ b/api/api/autoscaling.js @@ -35,15 +35,15 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name) @@ -61,10 +61,10 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut AutoscalingApi.prototype.getAutoscalingCapacity = function autoscalingGetAutoscalingCapacityApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_autoscaling' + '/' + 'capacity' @@ -83,15 +83,15 @@ AutoscalingApi.prototype.getAutoscalingPolicy = function autoscalingGetAutoscali ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name) @@ -110,19 +110,19 @@ AutoscalingApi.prototype.putAutoscalingPolicy = function autoscalingPutAutoscali ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name) diff --git a/api/api/bulk.js b/api/api/bulk.js index 5dfaeba94..b32fc633e 100644 --- a/api/api/bulk.js +++ b/api/api/bulk.js @@ -30,21 +30,21 @@ function bulkApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_bulk' diff --git a/api/api/cat.js b/api/api/cat.js index 81bd1dd31..39d9ad3dd 100644 --- a/api/api/cat.js +++ b/api/api/cat.js @@ -34,10 +34,10 @@ function CatApi (transport, ConfigurationError) { CatApi.prototype.aliases = function catAliasesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'aliases' + '/' + encodeURIComponent(name) @@ -60,10 +60,10 @@ CatApi.prototype.aliases = function catAliasesApi (params, options, callback) { CatApi.prototype.allocation = function catAllocationApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, nodeId, node_id, ...querystring } = params + let { method, body, nodeId, node_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((node_id || nodeId) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'allocation' + '/' + encodeURIComponent(node_id || nodeId) @@ -86,10 +86,10 @@ CatApi.prototype.allocation = function catAllocationApi (params, options, callba CatApi.prototype.count = function catCountApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'count' + '/' + encodeURIComponent(index) @@ -112,10 +112,10 @@ CatApi.prototype.count = function catCountApi (params, options, callback) { CatApi.prototype.fielddata = function catFielddataApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, fields, ...querystring } = params + let { method, body, fields, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((fields) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'fielddata' + '/' + encodeURIComponent(fields) @@ -138,10 +138,10 @@ CatApi.prototype.fielddata = function catFielddataApi (params, options, callback CatApi.prototype.health = function catHealthApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'health' @@ -159,10 +159,10 @@ CatApi.prototype.health = function catHealthApi (params, options, callback) { CatApi.prototype.help = function catHelpApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cat' @@ -180,10 +180,10 @@ CatApi.prototype.help = function catHelpApi (params, options, callback) { CatApi.prototype.indices = function catIndicesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'indices' + '/' + encodeURIComponent(index) @@ -206,10 +206,10 @@ CatApi.prototype.indices = function catIndicesApi (params, options, callback) { CatApi.prototype.master = function catMasterApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'master' @@ -227,10 +227,10 @@ CatApi.prototype.master = function catMasterApi (params, options, callback) { CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'nodeattrs' @@ -248,10 +248,10 @@ CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback CatApi.prototype.nodes = function catNodesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'nodes' @@ -269,10 +269,10 @@ CatApi.prototype.nodes = function catNodesApi (params, options, callback) { CatApi.prototype.pendingTasks = function catPendingTasksApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'pending_tasks' @@ -290,10 +290,10 @@ CatApi.prototype.pendingTasks = function catPendingTasksApi (params, options, ca CatApi.prototype.plugins = function catPluginsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'plugins' @@ -311,10 +311,10 @@ CatApi.prototype.plugins = function catPluginsApi (params, options, callback) { CatApi.prototype.recovery = function catRecoveryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index) @@ -337,10 +337,10 @@ CatApi.prototype.recovery = function catRecoveryApi (params, options, callback) CatApi.prototype.repositories = function catRepositoriesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'repositories' @@ -358,10 +358,10 @@ CatApi.prototype.repositories = function catRepositoriesApi (params, options, ca CatApi.prototype.segments = function catSegmentsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index) @@ -384,10 +384,10 @@ CatApi.prototype.segments = function catSegmentsApi (params, options, callback) CatApi.prototype.shards = function catShardsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index) @@ -410,10 +410,10 @@ CatApi.prototype.shards = function catShardsApi (params, options, callback) { CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, repository, ...querystring } = params + let { method, body, repository, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((repository) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository) @@ -436,10 +436,10 @@ CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback CatApi.prototype.tasks = function catTasksApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'tasks' @@ -457,10 +457,10 @@ CatApi.prototype.tasks = function catTasksApi (params, options, callback) { CatApi.prototype.templates = function catTemplatesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name) @@ -483,10 +483,10 @@ CatApi.prototype.templates = function catTemplatesApi (params, options, callback CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params + let { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((thread_pool_patterns || threadPoolPatterns) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns) @@ -509,10 +509,10 @@ CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callba CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) @@ -535,10 +535,10 @@ CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (par CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, datafeedId, datafeed_id, ...querystring } = params + let { method, body, datafeedId, datafeed_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((datafeed_id || datafeedId) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) @@ -561,10 +561,10 @@ CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, call CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((job_id || jobId) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) @@ -587,10 +587,10 @@ CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) { CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, modelId, model_id, ...querystring } = params + let { method, body, modelId, model_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((model_id || modelId) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) @@ -613,10 +613,10 @@ CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, optio CatApi.prototype.transforms = function catTransformsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, transformId, transform_id, ...querystring } = params + let { method, body, transformId, transform_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((transform_id || transformId) != null) { if (method == null) method = 'GET' path = '/' + '_cat' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) diff --git a/api/api/ccr.js b/api/api/ccr.js index e832c7491..8282ee015 100644 --- a/api/api/ccr.js +++ b/api/api/ccr.js @@ -35,15 +35,15 @@ CcrApi.prototype.deleteAutoFollowPattern = function ccrDeleteAutoFollowPatternAp ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) @@ -62,19 +62,19 @@ CcrApi.prototype.follow = function ccrFollowApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'follow' @@ -93,15 +93,15 @@ CcrApi.prototype.followInfo = function ccrFollowInfoApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'info' @@ -120,15 +120,15 @@ CcrApi.prototype.followStats = function ccrFollowStatsApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'stats' @@ -147,19 +147,19 @@ CcrApi.prototype.forgetFollower = function ccrForgetFollowerApi (params, options ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'forget_follower' @@ -177,10 +177,10 @@ CcrApi.prototype.forgetFollower = function ccrForgetFollowerApi (params, options CcrApi.prototype.getAutoFollowPattern = function ccrGetAutoFollowPatternApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) @@ -204,15 +204,15 @@ CcrApi.prototype.pauseAutoFollowPattern = function ccrPauseAutoFollowPatternApi ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'pause' @@ -231,15 +231,15 @@ CcrApi.prototype.pauseFollow = function ccrPauseFollowApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'pause_follow' @@ -258,19 +258,19 @@ CcrApi.prototype.putAutoFollowPattern = function ccrPutAutoFollowPatternApi (par ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) @@ -289,15 +289,15 @@ CcrApi.prototype.resumeAutoFollowPattern = function ccrResumeAutoFollowPatternAp ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'resume' @@ -316,15 +316,15 @@ CcrApi.prototype.resumeFollow = function ccrResumeFollowApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'resume_follow' @@ -342,10 +342,10 @@ CcrApi.prototype.resumeFollow = function ccrResumeFollowApi (params, options, ca CcrApi.prototype.stats = function ccrStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_ccr' + '/' + 'stats' @@ -364,15 +364,15 @@ CcrApi.prototype.unfollow = function ccrUnfollowApi (params, options, callback) ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'unfollow' diff --git a/api/api/clear_scroll.js b/api/api/clear_scroll.js index 9f8f40e8e..3b742abbc 100644 --- a/api/api/clear_scroll.js +++ b/api/api/clear_scroll.js @@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' } function clearScrollApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, scrollId, scroll_id, ...querystring } = params + let { method, body, scrollId, scroll_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((scroll_id || scrollId) != null) { if (method == null) method = 'DELETE' path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId) diff --git a/api/api/close_point_in_time.js b/api/api/close_point_in_time.js index 8bee84329..14c73a446 100644 --- a/api/api/close_point_in_time.js +++ b/api/api/close_point_in_time.js @@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' } function closePointInTimeApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_pit' diff --git a/api/api/cluster.js b/api/api/cluster.js index 088a74fea..5feb744f0 100644 --- a/api/api/cluster.js +++ b/api/api/cluster.js @@ -34,10 +34,10 @@ function ClusterApi (transport, ConfigurationError) { ClusterApi.prototype.allocationExplain = function clusterAllocationExplainApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain' @@ -56,15 +56,15 @@ ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTe ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_component_template' + '/' + encodeURIComponent(name) @@ -82,10 +82,10 @@ ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTe ClusterApi.prototype.deleteVotingConfigExclusions = function clusterDeleteVotingConfigExclusionsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_cluster' + '/' + 'voting_config_exclusions' @@ -104,15 +104,15 @@ ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTe ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'HEAD' path = '/' + '_component_template' + '/' + encodeURIComponent(name) @@ -130,10 +130,10 @@ ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTe ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_component_template' + '/' + encodeURIComponent(name) @@ -156,10 +156,10 @@ ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplate ClusterApi.prototype.getSettings = function clusterGetSettingsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cluster' + '/' + 'settings' @@ -177,10 +177,10 @@ ClusterApi.prototype.getSettings = function clusterGetSettingsApi (params, optio ClusterApi.prototype.health = function clusterHealthApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + '_cluster' + '/' + 'health' + '/' + encodeURIComponent(index) @@ -203,10 +203,10 @@ ClusterApi.prototype.health = function clusterHealthApi (params, options, callba ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_cluster' + '/' + 'pending_tasks' @@ -224,10 +224,10 @@ ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi (params, opt ClusterApi.prototype.postVotingConfigExclusions = function clusterPostVotingConfigExclusionsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_cluster' + '/' + 'voting_config_exclusions' @@ -246,19 +246,19 @@ ClusterApi.prototype.putComponentTemplate = function clusterPutComponentTemplate ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_component_template' + '/' + encodeURIComponent(name) @@ -277,15 +277,15 @@ ClusterApi.prototype.putSettings = function clusterPutSettingsApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_cluster' + '/' + 'settings' @@ -303,10 +303,10 @@ ClusterApi.prototype.putSettings = function clusterPutSettingsApi (params, optio ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_remote' + '/' + 'info' @@ -324,10 +324,10 @@ ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi (params, options ClusterApi.prototype.reroute = function clusterRerouteApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_cluster' + '/' + 'reroute' @@ -346,15 +346,15 @@ ClusterApi.prototype.state = function clusterStateApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required url components - if (params['index'] != null && (params['metric'] == null)) { + if (params.index != null && (params.metric == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: metric') return handleError(err, callback) } - var { method, body, metric, index, ...querystring } = params + let { method, body, metric, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((metric) != null && (index) != null) { if (method == null) method = 'GET' path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index) @@ -380,10 +380,10 @@ ClusterApi.prototype.state = function clusterStateApi (params, options, callback ClusterApi.prototype.stats = function clusterStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, nodeId, node_id, ...querystring } = params + let { method, body, nodeId, node_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((node_id || nodeId) != null) { if (method == null) method = 'GET' path = '/' + '_cluster' + '/' + 'stats' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) diff --git a/api/api/count.js b/api/api/count.js index 5d788bbd1..e4391a3fe 100644 --- a/api/api/count.js +++ b/api/api/count.js @@ -30,15 +30,15 @@ function countApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count' diff --git a/api/api/create.js b/api/api/create.js index 5977dd0a4..9a47b60d7 100644 --- a/api/api/create.js +++ b/api/api/create.js @@ -30,23 +30,23 @@ function createApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, id, index, type, ...querystring } = params + let { method, body, id, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_create' diff --git a/api/api/dangling_indices.js b/api/api/dangling_indices.js index b6475c69b..0d2a84ba4 100644 --- a/api/api/dangling_indices.js +++ b/api/api/dangling_indices.js @@ -35,15 +35,15 @@ DanglingIndicesApi.prototype.deleteDanglingIndex = function danglingIndicesDelet ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index_uuid'] == null && params['indexUuid'] == null) { + if (params.index_uuid == null && params.indexUuid == null) { const err = new this[kConfigurationError]('Missing required parameter: index_uuid or indexUuid') return handleError(err, callback) } - var { method, body, indexUuid, index_uuid, ...querystring } = params + let { method, body, indexUuid, index_uuid, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid) @@ -62,15 +62,15 @@ DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImpor ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index_uuid'] == null && params['indexUuid'] == null) { + if (params.index_uuid == null && params.indexUuid == null) { const err = new this[kConfigurationError]('Missing required parameter: index_uuid or indexUuid') return handleError(err, callback) } - var { method, body, indexUuid, index_uuid, ...querystring } = params + let { method, body, indexUuid, index_uuid, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid) @@ -88,10 +88,10 @@ DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImpor DanglingIndicesApi.prototype.listDanglingIndices = function danglingIndicesListDanglingIndicesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_dangling' diff --git a/api/api/delete.js b/api/api/delete.js index bcdb5fe5e..10709c2c5 100644 --- a/api/api/delete.js +++ b/api/api/delete.js @@ -30,19 +30,19 @@ function deleteApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, id, index, type, ...querystring } = params + let { method, body, id, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = 'DELETE' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js index 3a6a9a3d9..50c6533d3 100644 --- a/api/api/delete_by_query.js +++ b/api/api/delete_by_query.js @@ -30,25 +30,25 @@ function deleteByQueryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query' diff --git a/api/api/delete_by_query_rethrottle.js b/api/api/delete_by_query_rethrottle.js index 6221bbb01..01e4174fd 100644 --- a/api/api/delete_by_query_rethrottle.js +++ b/api/api/delete_by_query_rethrottle.js @@ -30,19 +30,19 @@ function deleteByQueryRethrottleApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['task_id'] == null && params['taskId'] == null) { + if (params.task_id == null && params.taskId == null) { const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId') return handleError(err, callback) } - if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) { + if (params.requests_per_second == null && params.requestsPerSecond == null) { const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond') return handleError(err, callback) } - var { method, body, taskId, task_id, ...querystring } = params + let { method, body, taskId, task_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_delete_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle' diff --git a/api/api/delete_script.js b/api/api/delete_script.js index b583be6b8..038899354 100644 --- a/api/api/delete_script.js +++ b/api/api/delete_script.js @@ -30,15 +30,15 @@ function deleteScriptApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_scripts' + '/' + encodeURIComponent(id) diff --git a/api/api/enrich.js b/api/api/enrich.js index 780ee943d..538a035d2 100644 --- a/api/api/enrich.js +++ b/api/api/enrich.js @@ -35,15 +35,15 @@ EnrichApi.prototype.deletePolicy = function enrichDeletePolicyApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) @@ -62,15 +62,15 @@ EnrichApi.prototype.executePolicy = function enrichExecutePolicyApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) + '/' + '_execute' @@ -88,10 +88,10 @@ EnrichApi.prototype.executePolicy = function enrichExecutePolicyApi (params, opt EnrichApi.prototype.getPolicy = function enrichGetPolicyApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) @@ -115,19 +115,19 @@ EnrichApi.prototype.putPolicy = function enrichPutPolicyApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) @@ -145,10 +145,10 @@ EnrichApi.prototype.putPolicy = function enrichPutPolicyApi (params, options, ca EnrichApi.prototype.stats = function enrichStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_enrich' + '/' + '_stats' diff --git a/api/api/eql.js b/api/api/eql.js index ee71c4b5f..46b718994 100644 --- a/api/api/eql.js +++ b/api/api/eql.js @@ -35,15 +35,15 @@ EqlApi.prototype.delete = function eqlDeleteApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id) @@ -62,15 +62,15 @@ EqlApi.prototype.get = function eqlGetApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id) @@ -89,15 +89,15 @@ EqlApi.prototype.getStatus = function eqlGetStatusApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_eql' + '/' + 'search' + '/' + 'status' + '/' + encodeURIComponent(id) @@ -116,19 +116,19 @@ EqlApi.prototype.search = function eqlSearchApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + '_eql' + '/' + 'search' diff --git a/api/api/exists.js b/api/api/exists.js index 5e907fd96..35c285d33 100644 --- a/api/api/exists.js +++ b/api/api/exists.js @@ -30,19 +30,19 @@ function existsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, id, index, type, ...querystring } = params + let { method, body, id, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = 'HEAD' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) diff --git a/api/api/exists_source.js b/api/api/exists_source.js index 930bc72ab..8cef71e8e 100644 --- a/api/api/exists_source.js +++ b/api/api/exists_source.js @@ -30,28 +30,28 @@ function existsSourceApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } // check required url components - if (params['id'] != null && (params['type'] == null || params['index'] == null)) { + if (params.id != null && (params.type == null || params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: type, index') return handleError(err, callback) - } else if (params['type'] != null && (params['index'] == null)) { + } else if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, id, index, type, ...querystring } = params + let { method, body, id, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = 'HEAD' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source' diff --git a/api/api/explain.js b/api/api/explain.js index da6ed2d9e..179a04a45 100644 --- a/api/api/explain.js +++ b/api/api/explain.js @@ -30,19 +30,19 @@ function explainApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, id, index, type, ...querystring } = params + let { method, body, id, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain' diff --git a/api/api/field_caps.js b/api/api/field_caps.js index fdc2f316c..ba3ea8214 100644 --- a/api/api/field_caps.js +++ b/api/api/field_caps.js @@ -29,10 +29,10 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'al function fieldCapsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + '_field_caps' diff --git a/api/api/get.js b/api/api/get.js index a45848470..eef0d9563 100644 --- a/api/api/get.js +++ b/api/api/get.js @@ -30,19 +30,19 @@ function getApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, id, index, type, ...querystring } = params + let { method, body, id, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) diff --git a/api/api/get_script.js b/api/api/get_script.js index 0409e82fe..c3b0c08ce 100644 --- a/api/api/get_script.js +++ b/api/api/get_script.js @@ -30,15 +30,15 @@ function getScriptApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_scripts' + '/' + encodeURIComponent(id) diff --git a/api/api/get_script_context.js b/api/api/get_script_context.js index 7c770f2d1..7f4d6f4f9 100644 --- a/api/api/get_script_context.js +++ b/api/api/get_script_context.js @@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' } function getScriptContextApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_script_context' diff --git a/api/api/get_script_languages.js b/api/api/get_script_languages.js index 455a1ca45..a5d71c61b 100644 --- a/api/api/get_script_languages.js +++ b/api/api/get_script_languages.js @@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' } function getScriptLanguagesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_script_language' diff --git a/api/api/get_source.js b/api/api/get_source.js index a0d716dab..f037f8213 100644 --- a/api/api/get_source.js +++ b/api/api/get_source.js @@ -30,19 +30,19 @@ function getSourceApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, id, index, type, ...querystring } = params + let { method, body, id, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source' diff --git a/api/api/graph.js b/api/api/graph.js index 5f6ac9420..96354603f 100644 --- a/api/api/graph.js +++ b/api/api/graph.js @@ -35,21 +35,21 @@ GraphApi.prototype.explore = function graphExploreApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore' diff --git a/api/api/ilm.js b/api/api/ilm.js index 55c138c00..9ded145c4 100644 --- a/api/api/ilm.js +++ b/api/api/ilm.js @@ -35,15 +35,15 @@ IlmApi.prototype.deleteLifecycle = function ilmDeleteLifecycleApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['policy'] == null) { + if (params.policy == null) { const err = new this[kConfigurationError]('Missing required parameter: policy') return handleError(err, callback) } - var { method, body, policy, ...querystring } = params + let { method, body, policy, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy) @@ -62,15 +62,15 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'explain' @@ -88,10 +88,10 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, policy, ...querystring } = params + let { method, body, policy, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((policy) != null) { if (method == null) method = 'GET' path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy) @@ -114,10 +114,10 @@ IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, ca IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_ilm' + '/' + 'status' @@ -136,15 +136,15 @@ IlmApi.prototype.moveToStep = function ilmMoveToStepApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ilm' + '/' + 'move' + '/' + encodeURIComponent(index) @@ -163,15 +163,15 @@ IlmApi.prototype.putLifecycle = function ilmPutLifecycleApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['policy'] == null) { + if (params.policy == null) { const err = new this[kConfigurationError]('Missing required parameter: policy') return handleError(err, callback) } - var { method, body, policy, ...querystring } = params + let { method, body, policy, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy) @@ -190,15 +190,15 @@ IlmApi.prototype.removePolicy = function ilmRemovePolicyApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'remove' @@ -217,15 +217,15 @@ IlmApi.prototype.retry = function ilmRetryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'retry' @@ -243,10 +243,10 @@ IlmApi.prototype.retry = function ilmRetryApi (params, options, callback) { IlmApi.prototype.start = function ilmStartApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ilm' + '/' + 'start' @@ -264,10 +264,10 @@ IlmApi.prototype.start = function ilmStartApi (params, options, callback) { IlmApi.prototype.stop = function ilmStopApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ilm' + '/' + 'stop' diff --git a/api/api/index.js b/api/api/index.js index c02874e6a..8a7654375 100644 --- a/api/api/index.js +++ b/api/api/index.js @@ -30,19 +30,19 @@ function indexApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, id, index, type, ...querystring } = params + let { method, body, id, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) diff --git a/api/api/indices.js b/api/api/indices.js index 11dd5e135..c3dd1206e 100644 --- a/api/api/indices.js +++ b/api/api/indices.js @@ -35,25 +35,25 @@ IndicesApi.prototype.addBlock = function indicesAddBlockApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['block'] == null) { + if (params.block == null) { const err = new this[kConfigurationError]('Missing required parameter: block') return handleError(err, callback) } // check required url components - if (params['block'] != null && (params['index'] == null)) { + if (params.block != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, block, ...querystring } = params + let { method, body, index, block, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + '_block' + '/' + encodeURIComponent(block) @@ -71,10 +71,10 @@ IndicesApi.prototype.addBlock = function indicesAddBlockApi (params, options, ca IndicesApi.prototype.analyze = function indicesAnalyzeApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + '_analyze' @@ -97,10 +97,10 @@ IndicesApi.prototype.analyze = function indicesAnalyzeApi (params, options, call IndicesApi.prototype.clearCache = function indicesClearCacheApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_cache' + '/' + 'clear' @@ -124,25 +124,25 @@ IndicesApi.prototype.clone = function indicesCloneApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['target'] == null) { + if (params.target == null) { const err = new this[kConfigurationError]('Missing required parameter: target') return handleError(err, callback) } // check required url components - if (params['target'] != null && (params['index'] == null)) { + if (params.target != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, target, ...querystring } = params + let { method, body, index, target, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + '_clone' + '/' + encodeURIComponent(target) @@ -161,15 +161,15 @@ IndicesApi.prototype.close = function indicesCloseApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_close' @@ -188,15 +188,15 @@ IndicesApi.prototype.create = function indicesCreateApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) @@ -215,15 +215,15 @@ IndicesApi.prototype.delete = function indicesDeleteApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + encodeURIComponent(index) @@ -242,25 +242,25 @@ IndicesApi.prototype.deleteAlias = function indicesDeleteAliasApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } // check required url components - if (params['name'] != null && (params['index'] == null)) { + if (params.name != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, name, ...querystring } = params + let { method, body, index, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (name) != null) { if (method == null) method = 'DELETE' path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name) @@ -284,15 +284,15 @@ IndicesApi.prototype.deleteIndexTemplate = function indicesDeleteIndexTemplateAp ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_index_template' + '/' + encodeURIComponent(name) @@ -311,15 +311,15 @@ IndicesApi.prototype.deleteTemplate = function indicesDeleteTemplateApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_template' + '/' + encodeURIComponent(name) @@ -338,15 +338,15 @@ IndicesApi.prototype.exists = function indicesExistsApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'HEAD' path = '/' + encodeURIComponent(index) @@ -365,15 +365,15 @@ IndicesApi.prototype.existsAlias = function indicesExistsAliasApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, index, ...querystring } = params + let { method, body, name, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (name) != null) { if (method == null) method = 'HEAD' path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name) @@ -397,15 +397,15 @@ IndicesApi.prototype.existsIndexTemplate = function indicesExistsIndexTemplateAp ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'HEAD' path = '/' + '_index_template' + '/' + encodeURIComponent(name) @@ -424,15 +424,15 @@ IndicesApi.prototype.existsTemplate = function indicesExistsTemplateApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'HEAD' path = '/' + '_template' + '/' + encodeURIComponent(name) @@ -451,25 +451,25 @@ IndicesApi.prototype.existsType = function indicesExistsTypeApi (params, options ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['type'] == null) { + if (params.type == null) { const err = new this[kConfigurationError]('Missing required parameter: type') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'HEAD' path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) @@ -487,10 +487,10 @@ IndicesApi.prototype.existsType = function indicesExistsTypeApi (params, options IndicesApi.prototype.flush = function indicesFlushApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + '_flush' @@ -513,10 +513,10 @@ IndicesApi.prototype.flush = function indicesFlushApi (params, options, callback IndicesApi.prototype.flushSynced = function indicesFlushSyncedApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced' @@ -534,10 +534,10 @@ IndicesApi.prototype.flushSynced = function indicesFlushSyncedApi (params, optio IndicesApi.prototype.forcemerge = function indicesForcemergeApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_forcemerge' @@ -561,15 +561,15 @@ IndicesApi.prototype.get = function indicesGetApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) @@ -587,10 +587,10 @@ IndicesApi.prototype.get = function indicesGetApi (params, options, callback) { IndicesApi.prototype.getAlias = function indicesGetAliasApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, index, ...querystring } = params + let { method, body, name, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (name) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name) @@ -620,15 +620,15 @@ IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi (param ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['fields'] == null) { + if (params.fields == null) { const err = new this[kConfigurationError]('Missing required parameter: fields') return handleError(err, callback) } - var { method, body, fields, index, type, ...querystring } = params + let { method, body, fields, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (fields) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields) @@ -657,10 +657,10 @@ IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi (param IndicesApi.prototype.getIndexTemplate = function indicesGetIndexTemplateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_index_template' + '/' + encodeURIComponent(name) @@ -683,10 +683,10 @@ IndicesApi.prototype.getIndexTemplate = function indicesGetIndexTemplateApi (par IndicesApi.prototype.getMapping = function indicesGetMappingApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) @@ -715,10 +715,10 @@ IndicesApi.prototype.getMapping = function indicesGetMappingApi (params, options IndicesApi.prototype.getSettings = function indicesGetSettingsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, name, ...querystring } = params + let { method, body, index, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (name) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_settings' + '/' + encodeURIComponent(name) @@ -747,10 +747,10 @@ IndicesApi.prototype.getSettings = function indicesGetSettingsApi (params, optio IndicesApi.prototype.getTemplate = function indicesGetTemplateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_template' + '/' + encodeURIComponent(name) @@ -773,10 +773,10 @@ IndicesApi.prototype.getTemplate = function indicesGetTemplateApi (params, optio IndicesApi.prototype.getUpgrade = function indicesGetUpgradeApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_upgrade' @@ -795,15 +795,15 @@ IndicesApi.prototype.open = function indicesOpenApi (params, options, callback) ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_open' @@ -822,25 +822,25 @@ IndicesApi.prototype.putAlias = function indicesPutAliasApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } // check required url components - if (params['name'] != null && (params['index'] == null)) { + if (params.name != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, name, ...querystring } = params + let { method, body, index, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (name) != null) { if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name) @@ -864,19 +864,19 @@ IndicesApi.prototype.putIndexTemplate = function indicesPutIndexTemplateApi (par ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_index_template' + '/' + encodeURIComponent(name) @@ -895,15 +895,15 @@ IndicesApi.prototype.putMapping = function indicesPutMappingApi (params, options ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mapping' @@ -945,15 +945,15 @@ IndicesApi.prototype.putSettings = function indicesPutSettingsApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + '_settings' @@ -977,19 +977,19 @@ IndicesApi.prototype.putTemplate = function indicesPutTemplateApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_template' + '/' + encodeURIComponent(name) @@ -1007,10 +1007,10 @@ IndicesApi.prototype.putTemplate = function indicesPutTemplateApi (params, optio IndicesApi.prototype.recovery = function indicesRecoveryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_recovery' @@ -1033,10 +1033,10 @@ IndicesApi.prototype.recovery = function indicesRecoveryApi (params, options, ca IndicesApi.prototype.refresh = function indicesRefreshApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + '_refresh' @@ -1060,15 +1060,15 @@ IndicesApi.prototype.resolveIndex = function indicesResolveIndexApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_resolve' + '/' + 'index' + '/' + encodeURIComponent(name) @@ -1087,21 +1087,21 @@ IndicesApi.prototype.rollover = function indicesRolloverApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['alias'] == null) { + if (params.alias == null) { const err = new this[kConfigurationError]('Missing required parameter: alias') return handleError(err, callback) } // check required url components - if ((params['new_index'] != null || params['newIndex'] != null) && (params['alias'] == null)) { + if ((params.new_index != null || params.newIndex != null) && (params.alias == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: alias') return handleError(err, callback) } - var { method, body, alias, newIndex, new_index, ...querystring } = params + let { method, body, alias, newIndex, new_index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((alias) != null && (new_index || newIndex) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(alias) + '/' + '_rollover' + '/' + encodeURIComponent(new_index || newIndex) @@ -1124,10 +1124,10 @@ IndicesApi.prototype.rollover = function indicesRolloverApi (params, options, ca IndicesApi.prototype.segments = function indicesSegmentsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_segments' @@ -1150,10 +1150,10 @@ IndicesApi.prototype.segments = function indicesSegmentsApi (params, options, ca IndicesApi.prototype.shardStores = function indicesShardStoresApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_shard_stores' @@ -1177,25 +1177,25 @@ IndicesApi.prototype.shrink = function indicesShrinkApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['target'] == null) { + if (params.target == null) { const err = new this[kConfigurationError]('Missing required parameter: target') return handleError(err, callback) } // check required url components - if (params['target'] != null && (params['index'] == null)) { + if (params.target != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, target, ...querystring } = params + let { method, body, index, target, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + '_shrink' + '/' + encodeURIComponent(target) @@ -1214,15 +1214,15 @@ IndicesApi.prototype.simulateIndexTemplate = function indicesSimulateIndexTempla ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_index_template' + '/' + '_simulate_index' + '/' + encodeURIComponent(name) @@ -1240,10 +1240,10 @@ IndicesApi.prototype.simulateIndexTemplate = function indicesSimulateIndexTempla IndicesApi.prototype.simulateTemplate = function indicesSimulateTemplateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'POST' path = '/' + '_index_template' + '/' + '_simulate' + '/' + encodeURIComponent(name) @@ -1267,25 +1267,25 @@ IndicesApi.prototype.split = function indicesSplitApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['target'] == null) { + if (params.target == null) { const err = new this[kConfigurationError]('Missing required parameter: target') return handleError(err, callback) } // check required url components - if (params['target'] != null && (params['index'] == null)) { + if (params.target != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, target, ...querystring } = params + let { method, body, index, target, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + '_split' + '/' + encodeURIComponent(target) @@ -1303,10 +1303,10 @@ IndicesApi.prototype.split = function indicesSplitApi (params, options, callback IndicesApi.prototype.stats = function indicesStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, metric, index, ...querystring } = params + let { method, body, metric, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (metric) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_stats' + '/' + encodeURIComponent(metric) @@ -1336,15 +1336,15 @@ IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi (params, o ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_aliases' @@ -1362,10 +1362,10 @@ IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi (params, o IndicesApi.prototype.upgrade = function indicesUpgradeApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_upgrade' @@ -1384,15 +1384,15 @@ IndicesApi.prototype.validateQuery = function indicesValidateQueryApi (params, o ;[params, options, callback] = normalizeArguments(params, options, callback) // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_validate' + '/' + 'query' @@ -1419,15 +1419,15 @@ IndicesApi.prototype.createDataStream = function indicesCreateDataStreamApi (par ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_data_stream' + '/' + encodeURIComponent(name) @@ -1445,10 +1445,10 @@ IndicesApi.prototype.createDataStream = function indicesCreateDataStreamApi (par IndicesApi.prototype.dataStreamsStats = function indicesDataStreamsStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_data_stream' + '/' + encodeURIComponent(name) + '/' + '_stats' @@ -1472,15 +1472,15 @@ IndicesApi.prototype.deleteDataStream = function indicesDeleteDataStreamApi (par ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_data_stream' + '/' + encodeURIComponent(name) @@ -1499,15 +1499,15 @@ IndicesApi.prototype.freeze = function indicesFreezeApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_freeze' @@ -1525,10 +1525,10 @@ IndicesApi.prototype.freeze = function indicesFreezeApi (params, options, callba IndicesApi.prototype.getDataStream = function indicesGetDataStreamApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_data_stream' + '/' + encodeURIComponent(name) @@ -1552,15 +1552,15 @@ IndicesApi.prototype.migrateToDataStream = function indicesMigrateToDataStreamAp ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_data_stream' + '/' + '_migrate' + '/' + encodeURIComponent(name) @@ -1579,15 +1579,15 @@ IndicesApi.prototype.promoteDataStream = function indicesPromoteDataStreamApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_data_stream' + '/' + '_promote' + '/' + encodeURIComponent(name) @@ -1606,15 +1606,15 @@ IndicesApi.prototype.reloadSearchAnalyzers = function indicesReloadSearchAnalyze ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + '_reload_search_analyzers' @@ -1633,15 +1633,15 @@ IndicesApi.prototype.unfreeze = function indicesUnfreezeApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_unfreeze' diff --git a/api/api/info.js b/api/api/info.js index 518dfaaef..7a1c84709 100644 --- a/api/api/info.js +++ b/api/api/info.js @@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' } function infoApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' diff --git a/api/api/ingest.js b/api/api/ingest.js index 5763190ea..4ba7f6a21 100644 --- a/api/api/ingest.js +++ b/api/api/ingest.js @@ -35,15 +35,15 @@ IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi (params, o ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) @@ -61,10 +61,10 @@ IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi (params, o IngestApi.prototype.getPipeline = function ingestGetPipelineApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = 'GET' path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) @@ -87,10 +87,10 @@ IngestApi.prototype.getPipeline = function ingestGetPipelineApi (params, options IngestApi.prototype.processorGrok = function ingestProcessorGrokApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_ingest' + '/' + 'processor' + '/' + 'grok' @@ -109,19 +109,19 @@ IngestApi.prototype.putPipeline = function ingestPutPipelineApi (params, options ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) @@ -140,15 +140,15 @@ IngestApi.prototype.simulate = function ingestSimulateApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) + '/' + '_simulate' diff --git a/api/api/license.js b/api/api/license.js index 6bc197c6a..5449f2a96 100644 --- a/api/api/license.js +++ b/api/api/license.js @@ -34,10 +34,10 @@ function LicenseApi (transport, ConfigurationError) { LicenseApi.prototype.delete = function licenseDeleteApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_license' @@ -55,10 +55,10 @@ LicenseApi.prototype.delete = function licenseDeleteApi (params, options, callba LicenseApi.prototype.get = function licenseGetApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_license' @@ -76,10 +76,10 @@ LicenseApi.prototype.get = function licenseGetApi (params, options, callback) { LicenseApi.prototype.getBasicStatus = function licenseGetBasicStatusApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_license' + '/' + 'basic_status' @@ -97,10 +97,10 @@ LicenseApi.prototype.getBasicStatus = function licenseGetBasicStatusApi (params, LicenseApi.prototype.getTrialStatus = function licenseGetTrialStatusApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_license' + '/' + 'trial_status' @@ -118,10 +118,10 @@ LicenseApi.prototype.getTrialStatus = function licenseGetTrialStatusApi (params, LicenseApi.prototype.post = function licensePostApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_license' @@ -139,10 +139,10 @@ LicenseApi.prototype.post = function licensePostApi (params, options, callback) LicenseApi.prototype.postStartBasic = function licensePostStartBasicApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_license' + '/' + 'start_basic' @@ -160,10 +160,10 @@ LicenseApi.prototype.postStartBasic = function licensePostStartBasicApi (params, LicenseApi.prototype.postStartTrial = function licensePostStartTrialApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_license' + '/' + 'start_trial' diff --git a/api/api/logstash.js b/api/api/logstash.js index 6253992fe..22bec441f 100644 --- a/api/api/logstash.js +++ b/api/api/logstash.js @@ -35,15 +35,15 @@ LogstashApi.prototype.deletePipeline = function logstashDeletePipelineApi (param ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_logstash' + '/' + 'pipeline' + '/' + encodeURIComponent(id) @@ -62,15 +62,15 @@ LogstashApi.prototype.getPipeline = function logstashGetPipelineApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_logstash' + '/' + 'pipeline' + '/' + encodeURIComponent(id) @@ -89,19 +89,19 @@ LogstashApi.prototype.putPipeline = function logstashPutPipelineApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_logstash' + '/' + 'pipeline' + '/' + encodeURIComponent(id) diff --git a/api/api/mget.js b/api/api/mget.js index 2ff5d404e..3c0d63494 100644 --- a/api/api/mget.js +++ b/api/api/mget.js @@ -30,21 +30,21 @@ function mgetApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget' diff --git a/api/api/migration.js b/api/api/migration.js index f77baf7e5..ed480f871 100644 --- a/api/api/migration.js +++ b/api/api/migration.js @@ -34,10 +34,10 @@ function MigrationApi (transport, ConfigurationError) { MigrationApi.prototype.deprecations = function migrationDeprecationsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_migration' + '/' + 'deprecations' diff --git a/api/api/ml.js b/api/api/ml.js index 05c5926e1..ede2eca53 100644 --- a/api/api/ml.js +++ b/api/api/ml.js @@ -35,15 +35,15 @@ MlApi.prototype.closeJob = function mlCloseJobApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_close' @@ -62,15 +62,15 @@ MlApi.prototype.deleteCalendar = function mlDeleteCalendarApi (params, options, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new this[kConfigurationError]('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } - var { method, body, calendarId, calendar_id, ...querystring } = params + let { method, body, calendarId, calendar_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) @@ -89,25 +89,25 @@ MlApi.prototype.deleteCalendarEvent = function mlDeleteCalendarEventApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new this[kConfigurationError]('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } - if (params['event_id'] == null && params['eventId'] == null) { + if (params.event_id == null && params.eventId == null) { const err = new this[kConfigurationError]('Missing required parameter: event_id or eventId') return handleError(err, callback) } // check required url components - if ((params['event_id'] != null || params['eventId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) { + if ((params.event_id != null || params.eventId != null) && ((params.calendar_id == null && params.calendarId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: calendar_id') return handleError(err, callback) } - var { method, body, calendarId, calendar_id, eventId, event_id, ...querystring } = params + let { method, body, calendarId, calendar_id, eventId, event_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events' + '/' + encodeURIComponent(event_id || eventId) @@ -126,25 +126,25 @@ MlApi.prototype.deleteCalendarJob = function mlDeleteCalendarJobApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new this[kConfigurationError]('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } // check required url components - if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) { + if ((params.job_id != null || params.jobId != null) && ((params.calendar_id == null && params.calendarId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: calendar_id') return handleError(err, callback) } - var { method, body, calendarId, calendar_id, jobId, job_id, ...querystring } = params + let { method, body, calendarId, calendar_id, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'jobs' + '/' + encodeURIComponent(job_id || jobId) @@ -163,15 +163,15 @@ MlApi.prototype.deleteDataFrameAnalytics = function mlDeleteDataFrameAnalyticsAp ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) @@ -190,15 +190,15 @@ MlApi.prototype.deleteDatafeed = function mlDeleteDatafeedApi (params, options, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new this[kConfigurationError]('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - var { method, body, datafeedId, datafeed_id, ...querystring } = params + let { method, body, datafeedId, datafeed_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) @@ -216,10 +216,10 @@ MlApi.prototype.deleteDatafeed = function mlDeleteDatafeedApi (params, options, MlApi.prototype.deleteExpiredData = function mlDeleteExpiredDataApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((job_id || jobId) != null) { if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + '_delete_expired_data' + '/' + encodeURIComponent(job_id || jobId) @@ -243,15 +243,15 @@ MlApi.prototype.deleteFilter = function mlDeleteFilterApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['filter_id'] == null && params['filterId'] == null) { + if (params.filter_id == null && params.filterId == null) { const err = new this[kConfigurationError]('Missing required parameter: filter_id or filterId') return handleError(err, callback) } - var { method, body, filterId, filter_id, ...querystring } = params + let { method, body, filterId, filter_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId) @@ -270,21 +270,21 @@ MlApi.prototype.deleteForecast = function mlDeleteForecastApi (params, options, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } // check required url components - if ((params['forecast_id'] != null || params['forecastId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) { + if ((params.forecast_id != null || params.forecastId != null) && ((params.job_id == null && params.jobId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: job_id') return handleError(err, callback) } - var { method, body, jobId, job_id, forecastId, forecast_id, ...querystring } = params + let { method, body, jobId, job_id, forecastId, forecast_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((job_id || jobId) != null && (forecast_id || forecastId) != null) { if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast' + '/' + encodeURIComponent(forecast_id || forecastId) @@ -308,15 +308,15 @@ MlApi.prototype.deleteJob = function mlDeleteJobApi (params, options, callback) ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) @@ -335,25 +335,25 @@ MlApi.prototype.deleteModelSnapshot = function mlDeleteModelSnapshotApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['snapshot_id'] == null && params['snapshotId'] == null) { + if (params.snapshot_id == null && params.snapshotId == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot_id or snapshotId') return handleError(err, callback) } // check required url components - if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) { + if ((params.snapshot_id != null || params.snapshotId != null) && ((params.job_id == null && params.jobId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: job_id') return handleError(err, callback) } - var { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params + let { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) @@ -372,15 +372,15 @@ MlApi.prototype.deleteTrainedModel = function mlDeleteTrainedModelApi (params, o ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['model_id'] == null && params['modelId'] == null) { + if (params.model_id == null && params.modelId == null) { const err = new this[kConfigurationError]('Missing required parameter: model_id or modelId') return handleError(err, callback) } - var { method, body, modelId, model_id, ...querystring } = params + let { method, body, modelId, model_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) @@ -399,15 +399,15 @@ MlApi.prototype.estimateModelMemory = function mlEstimateModelMemoryApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + '_estimate_model_memory' @@ -426,15 +426,15 @@ MlApi.prototype.evaluateDataFrame = function mlEvaluateDataFrameApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'data_frame' + '/' + '_evaluate' @@ -452,10 +452,10 @@ MlApi.prototype.evaluateDataFrame = function mlEvaluateDataFrameApi (params, opt MlApi.prototype.explainDataFrameAnalytics = function mlExplainDataFrameAnalyticsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) + '/' + '_explain' @@ -479,15 +479,15 @@ MlApi.prototype.flushJob = function mlFlushJobApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_flush' @@ -506,15 +506,15 @@ MlApi.prototype.forecast = function mlForecastApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_forecast' @@ -533,21 +533,21 @@ MlApi.prototype.getBuckets = function mlGetBucketsApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } // check required url components - if (params['timestamp'] != null && ((params['job_id'] == null && params['jobId'] == null))) { + if (params.timestamp != null && ((params.job_id == null && params.jobId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: job_id') return handleError(err, callback) } - var { method, body, jobId, job_id, timestamp, ...querystring } = params + let { method, body, jobId, job_id, timestamp, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((job_id || jobId) != null && (timestamp) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'buckets' + '/' + encodeURIComponent(timestamp) @@ -571,15 +571,15 @@ MlApi.prototype.getCalendarEvents = function mlGetCalendarEventsApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new this[kConfigurationError]('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } - var { method, body, calendarId, calendar_id, ...querystring } = params + let { method, body, calendarId, calendar_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events' @@ -597,10 +597,10 @@ MlApi.prototype.getCalendarEvents = function mlGetCalendarEventsApi (params, opt MlApi.prototype.getCalendars = function mlGetCalendarsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, calendarId, calendar_id, ...querystring } = params + let { method, body, calendarId, calendar_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((calendar_id || calendarId) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) @@ -624,21 +624,21 @@ MlApi.prototype.getCategories = function mlGetCategoriesApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } // check required url components - if ((params['category_id'] != null || params['categoryId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) { + if ((params.category_id != null || params.categoryId != null) && ((params.job_id == null && params.jobId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: job_id') return handleError(err, callback) } - var { method, body, jobId, job_id, categoryId, category_id, ...querystring } = params + let { method, body, jobId, job_id, categoryId, category_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((job_id || jobId) != null && (category_id || categoryId) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'categories' + '/' + encodeURIComponent(category_id || categoryId) @@ -661,10 +661,10 @@ MlApi.prototype.getCategories = function mlGetCategoriesApi (params, options, ca MlApi.prototype.getDataFrameAnalytics = function mlGetDataFrameAnalyticsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) @@ -687,10 +687,10 @@ MlApi.prototype.getDataFrameAnalytics = function mlGetDataFrameAnalyticsApi (par MlApi.prototype.getDataFrameAnalyticsStats = function mlGetDataFrameAnalyticsStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) + '/' + '_stats' @@ -713,10 +713,10 @@ MlApi.prototype.getDataFrameAnalyticsStats = function mlGetDataFrameAnalyticsSta MlApi.prototype.getDatafeedStats = function mlGetDatafeedStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, datafeedId, datafeed_id, ...querystring } = params + let { method, body, datafeedId, datafeed_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((datafeed_id || datafeedId) != null) { if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_stats' @@ -739,10 +739,10 @@ MlApi.prototype.getDatafeedStats = function mlGetDatafeedStatsApi (params, optio MlApi.prototype.getDatafeeds = function mlGetDatafeedsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, datafeedId, datafeed_id, ...querystring } = params + let { method, body, datafeedId, datafeed_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((datafeed_id || datafeedId) != null) { if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) @@ -765,10 +765,10 @@ MlApi.prototype.getDatafeeds = function mlGetDatafeedsApi (params, options, call MlApi.prototype.getFilters = function mlGetFiltersApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, filterId, filter_id, ...querystring } = params + let { method, body, filterId, filter_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((filter_id || filterId) != null) { if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId) @@ -792,15 +792,15 @@ MlApi.prototype.getInfluencers = function mlGetInfluencersApi (params, options, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'influencers' @@ -818,10 +818,10 @@ MlApi.prototype.getInfluencers = function mlGetInfluencersApi (params, options, MlApi.prototype.getJobStats = function mlGetJobStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((job_id || jobId) != null) { if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_stats' @@ -844,10 +844,10 @@ MlApi.prototype.getJobStats = function mlGetJobStatsApi (params, options, callba MlApi.prototype.getJobs = function mlGetJobsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((job_id || jobId) != null) { if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) @@ -871,21 +871,21 @@ MlApi.prototype.getModelSnapshots = function mlGetModelSnapshotsApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } // check required url components - if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) { + if ((params.snapshot_id != null || params.snapshotId != null) && ((params.job_id == null && params.jobId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: job_id') return handleError(err, callback) } - var { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params + let { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((job_id || jobId) != null && (snapshot_id || snapshotId) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) @@ -909,15 +909,15 @@ MlApi.prototype.getOverallBuckets = function mlGetOverallBucketsApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'overall_buckets' @@ -936,15 +936,15 @@ MlApi.prototype.getRecords = function mlGetRecordsApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'results' + '/' + 'records' @@ -962,10 +962,10 @@ MlApi.prototype.getRecords = function mlGetRecordsApi (params, options, callback MlApi.prototype.getTrainedModels = function mlGetTrainedModelsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, modelId, model_id, ...querystring } = params + let { method, body, modelId, model_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((model_id || modelId) != null) { if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) @@ -988,10 +988,10 @@ MlApi.prototype.getTrainedModels = function mlGetTrainedModelsApi (params, optio MlApi.prototype.getTrainedModelsStats = function mlGetTrainedModelsStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, modelId, model_id, ...querystring } = params + let { method, body, modelId, model_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((model_id || modelId) != null) { if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) + '/' + '_stats' @@ -1014,10 +1014,10 @@ MlApi.prototype.getTrainedModelsStats = function mlGetTrainedModelsStatsApi (par MlApi.prototype.info = function mlInfoApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'info' @@ -1036,15 +1036,15 @@ MlApi.prototype.openJob = function mlOpenJobApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_open' @@ -1063,19 +1063,19 @@ MlApi.prototype.postCalendarEvents = function mlPostCalendarEventsApi (params, o ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new this[kConfigurationError]('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, calendarId, calendar_id, ...querystring } = params + let { method, body, calendarId, calendar_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'events' @@ -1094,19 +1094,19 @@ MlApi.prototype.postData = function mlPostDataApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_data' @@ -1125,15 +1125,15 @@ MlApi.prototype.previewDatafeed = function mlPreviewDatafeedApi (params, options ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new this[kConfigurationError]('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - var { method, body, datafeedId, datafeed_id, ...querystring } = params + let { method, body, datafeedId, datafeed_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_preview' @@ -1152,15 +1152,15 @@ MlApi.prototype.putCalendar = function mlPutCalendarApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new this[kConfigurationError]('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } - var { method, body, calendarId, calendar_id, ...querystring } = params + let { method, body, calendarId, calendar_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) @@ -1179,25 +1179,25 @@ MlApi.prototype.putCalendarJob = function mlPutCalendarJobApi (params, options, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new this[kConfigurationError]('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } // check required url components - if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) { + if ((params.job_id != null || params.jobId != null) && ((params.calendar_id == null && params.calendarId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: calendar_id') return handleError(err, callback) } - var { method, body, calendarId, calendar_id, jobId, job_id, ...querystring } = params + let { method, body, calendarId, calendar_id, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ml' + '/' + 'calendars' + '/' + encodeURIComponent(calendar_id || calendarId) + '/' + 'jobs' + '/' + encodeURIComponent(job_id || jobId) @@ -1216,19 +1216,19 @@ MlApi.prototype.putDataFrameAnalytics = function mlPutDataFrameAnalyticsApi (par ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) @@ -1247,19 +1247,19 @@ MlApi.prototype.putDatafeed = function mlPutDatafeedApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new this[kConfigurationError]('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, datafeedId, datafeed_id, ...querystring } = params + let { method, body, datafeedId, datafeed_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) @@ -1278,19 +1278,19 @@ MlApi.prototype.putFilter = function mlPutFilterApi (params, options, callback) ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['filter_id'] == null && params['filterId'] == null) { + if (params.filter_id == null && params.filterId == null) { const err = new this[kConfigurationError]('Missing required parameter: filter_id or filterId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, filterId, filter_id, ...querystring } = params + let { method, body, filterId, filter_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId) @@ -1309,19 +1309,19 @@ MlApi.prototype.putJob = function mlPutJobApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) @@ -1340,19 +1340,19 @@ MlApi.prototype.putTrainedModel = function mlPutTrainedModelApi (params, options ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['model_id'] == null && params['modelId'] == null) { + if (params.model_id == null && params.modelId == null) { const err = new this[kConfigurationError]('Missing required parameter: model_id or modelId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, modelId, model_id, ...querystring } = params + let { method, body, modelId, model_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) @@ -1371,25 +1371,25 @@ MlApi.prototype.revertModelSnapshot = function mlRevertModelSnapshotApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['snapshot_id'] == null && params['snapshotId'] == null) { + if (params.snapshot_id == null && params.snapshotId == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot_id or snapshotId') return handleError(err, callback) } // check required url components - if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) { + if ((params.snapshot_id != null || params.snapshotId != null) && ((params.job_id == null && params.jobId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: job_id') return handleError(err, callback) } - var { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params + let { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_revert' @@ -1407,10 +1407,10 @@ MlApi.prototype.revertModelSnapshot = function mlRevertModelSnapshotApi (params, MlApi.prototype.setUpgradeMode = function mlSetUpgradeModeApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'set_upgrade_mode' @@ -1429,15 +1429,15 @@ MlApi.prototype.startDataFrameAnalytics = function mlStartDataFrameAnalyticsApi ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) + '/' + '_start' @@ -1456,15 +1456,15 @@ MlApi.prototype.startDatafeed = function mlStartDatafeedApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new this[kConfigurationError]('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - var { method, body, datafeedId, datafeed_id, ...querystring } = params + let { method, body, datafeedId, datafeed_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_start' @@ -1483,15 +1483,15 @@ MlApi.prototype.stopDataFrameAnalytics = function mlStopDataFrameAnalyticsApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) + '/' + '_stop' @@ -1510,15 +1510,15 @@ MlApi.prototype.stopDatafeed = function mlStopDatafeedApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new this[kConfigurationError]('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - var { method, body, datafeedId, datafeed_id, ...querystring } = params + let { method, body, datafeedId, datafeed_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_stop' @@ -1537,19 +1537,19 @@ MlApi.prototype.updateDataFrameAnalytics = function mlUpdateDataFrameAnalyticsAp ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) + '/' + '_update' @@ -1568,19 +1568,19 @@ MlApi.prototype.updateDatafeed = function mlUpdateDatafeedApi (params, options, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new this[kConfigurationError]('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, datafeedId, datafeed_id, ...querystring } = params + let { method, body, datafeedId, datafeed_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_update' @@ -1599,19 +1599,19 @@ MlApi.prototype.updateFilter = function mlUpdateFilterApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['filter_id'] == null && params['filterId'] == null) { + if (params.filter_id == null && params.filterId == null) { const err = new this[kConfigurationError]('Missing required parameter: filter_id or filterId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, filterId, filter_id, ...querystring } = params + let { method, body, filterId, filter_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'filters' + '/' + encodeURIComponent(filter_id || filterId) + '/' + '_update' @@ -1630,19 +1630,19 @@ MlApi.prototype.updateJob = function mlUpdateJobApi (params, options, callback) ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, jobId, job_id, ...querystring } = params + let { method, body, jobId, job_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_update' @@ -1661,29 +1661,29 @@ MlApi.prototype.updateModelSnapshot = function mlUpdateModelSnapshotApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['snapshot_id'] == null && params['snapshotId'] == null) { + if (params.snapshot_id == null && params.snapshotId == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot_id or snapshotId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) { + if ((params.snapshot_id != null || params.snapshotId != null) && ((params.job_id == null && params.jobId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: job_id') return handleError(err, callback) } - var { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params + let { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_update' @@ -1702,25 +1702,25 @@ MlApi.prototype.upgradeJobSnapshot = function mlUpgradeJobSnapshotApi (params, o ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['snapshot_id'] == null && params['snapshotId'] == null) { + if (params.snapshot_id == null && params.snapshotId == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot_id or snapshotId') return handleError(err, callback) } // check required url components - if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) { + if ((params.snapshot_id != null || params.snapshotId != null) && ((params.job_id == null && params.jobId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: job_id') return handleError(err, callback) } - var { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params + let { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_upgrade' @@ -1739,15 +1739,15 @@ MlApi.prototype.validate = function mlValidateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + '_validate' @@ -1766,15 +1766,15 @@ MlApi.prototype.validateDetector = function mlValidateDetectorApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + '_validate' + '/' + 'detector' diff --git a/api/api/monitoring.js b/api/api/monitoring.js index db24d5d4e..5366bd517 100644 --- a/api/api/monitoring.js +++ b/api/api/monitoring.js @@ -35,15 +35,15 @@ MonitoringApi.prototype.bulk = function monitoringBulkApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, type, ...querystring } = params + let { method, body, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((type) != null) { if (method == null) method = 'POST' path = '/' + '_monitoring' + '/' + encodeURIComponent(type) + '/' + 'bulk' diff --git a/api/api/msearch.js b/api/api/msearch.js index 23aeaa617..014ec8691 100644 --- a/api/api/msearch.js +++ b/api/api/msearch.js @@ -30,21 +30,21 @@ function msearchApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' diff --git a/api/api/msearch_template.js b/api/api/msearch_template.js index 2fe9a63bc..11e836d2b 100644 --- a/api/api/msearch_template.js +++ b/api/api/msearch_template.js @@ -30,21 +30,21 @@ function msearchTemplateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' + '/' + 'template' diff --git a/api/api/mtermvectors.js b/api/api/mtermvectors.js index aff633db5..e844572f8 100644 --- a/api/api/mtermvectors.js +++ b/api/api/mtermvectors.js @@ -30,15 +30,15 @@ function mtermvectorsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors' diff --git a/api/api/nodes.js b/api/api/nodes.js index aba848bed..80989c58b 100644 --- a/api/api/nodes.js +++ b/api/api/nodes.js @@ -34,10 +34,10 @@ function NodesApi (transport, ConfigurationError) { NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, nodeId, node_id, ...querystring } = params + let { method, body, nodeId, node_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((node_id || nodeId) != null) { if (method == null) method = 'GET' path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads' @@ -69,10 +69,10 @@ NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, ca NodesApi.prototype.info = function nodesInfoApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, nodeId, node_id, metric, ...querystring } = params + let { method, body, nodeId, node_id, metric, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((node_id || nodeId) != null && (metric) != null) { if (method == null) method = 'GET' path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + encodeURIComponent(metric) @@ -101,10 +101,10 @@ NodesApi.prototype.info = function nodesInfoApi (params, options, callback) { NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, nodeId, node_id, ...querystring } = params + let { method, body, nodeId, node_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((node_id || nodeId) != null) { if (method == null) method = 'POST' path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'reload_secure_settings' @@ -127,10 +127,10 @@ NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, nodeId, node_id, metric, indexMetric, index_metric, ...querystring } = params + let { method, body, nodeId, node_id, metric, indexMetric, index_metric, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((node_id || nodeId) != null && (metric) != null && (index_metric || indexMetric) != null) { if (method == null) method = 'GET' path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index_metric || indexMetric) @@ -165,10 +165,10 @@ NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) { NodesApi.prototype.usage = function nodesUsageApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, nodeId, node_id, metric, ...querystring } = params + let { method, body, nodeId, node_id, metric, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((node_id || nodeId) != null && (metric) != null) { if (method == null) method = 'GET' path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'usage' + '/' + encodeURIComponent(metric) diff --git a/api/api/open_point_in_time.js b/api/api/open_point_in_time.js index 61a5fb34c..81953f193 100644 --- a/api/api/open_point_in_time.js +++ b/api/api/open_point_in_time.js @@ -29,10 +29,10 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', expandWildcards: 'e function openPointInTimeApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_pit' diff --git a/api/api/ping.js b/api/api/ping.js index 54906b201..48c64f38e 100644 --- a/api/api/ping.js +++ b/api/api/ping.js @@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' } function pingApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'HEAD' path = '/' diff --git a/api/api/put_script.js b/api/api/put_script.js index cf039eaae..0737ffc61 100644 --- a/api/api/put_script.js +++ b/api/api/put_script.js @@ -30,25 +30,25 @@ function putScriptApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if (params['context'] != null && (params['id'] == null)) { + if (params.context != null && (params.id == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: id') return handleError(err, callback) } - var { method, body, id, context, ...querystring } = params + let { method, body, id, context, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null && (context) != null) { if (method == null) method = 'PUT' path = '/' + '_scripts' + '/' + encodeURIComponent(id) + '/' + encodeURIComponent(context) diff --git a/api/api/rank_eval.js b/api/api/rank_eval.js index 13dd35188..e8b7993bc 100644 --- a/api/api/rank_eval.js +++ b/api/api/rank_eval.js @@ -30,15 +30,15 @@ function rankEvalApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + '_rank_eval' diff --git a/api/api/reindex.js b/api/api/reindex.js index 251bef8ad..6f3f0541f 100644 --- a/api/api/reindex.js +++ b/api/api/reindex.js @@ -30,15 +30,15 @@ function reindexApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_reindex' diff --git a/api/api/reindex_rethrottle.js b/api/api/reindex_rethrottle.js index afcf87295..649edfa29 100644 --- a/api/api/reindex_rethrottle.js +++ b/api/api/reindex_rethrottle.js @@ -30,19 +30,19 @@ function reindexRethrottleApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['task_id'] == null && params['taskId'] == null) { + if (params.task_id == null && params.taskId == null) { const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId') return handleError(err, callback) } - if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) { + if (params.requests_per_second == null && params.requestsPerSecond == null) { const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond') return handleError(err, callback) } - var { method, body, taskId, task_id, ...querystring } = params + let { method, body, taskId, task_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_reindex' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle' diff --git a/api/api/render_search_template.js b/api/api/render_search_template.js index c5455701c..795ec8c51 100644 --- a/api/api/render_search_template.js +++ b/api/api/render_search_template.js @@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' } function renderSearchTemplateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_render' + '/' + 'template' + '/' + encodeURIComponent(id) diff --git a/api/api/rollup.js b/api/api/rollup.js index 364097f3b..37a3ad946 100644 --- a/api/api/rollup.js +++ b/api/api/rollup.js @@ -35,15 +35,15 @@ RollupApi.prototype.deleteJob = function rollupDeleteJobApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) @@ -61,10 +61,10 @@ RollupApi.prototype.deleteJob = function rollupDeleteJobApi (params, options, ca RollupApi.prototype.getJobs = function rollupGetJobsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = 'GET' path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) @@ -87,10 +87,10 @@ RollupApi.prototype.getJobs = function rollupGetJobsApi (params, options, callba RollupApi.prototype.getRollupCaps = function rollupGetRollupCapsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = 'GET' path = '/' + '_rollup' + '/' + 'data' + '/' + encodeURIComponent(id) @@ -114,15 +114,15 @@ RollupApi.prototype.getRollupIndexCaps = function rollupGetRollupIndexCapsApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + 'data' @@ -141,19 +141,19 @@ RollupApi.prototype.putJob = function rollupPutJobApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) @@ -172,29 +172,29 @@ RollupApi.prototype.rollup = function rollupRollupApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['rollup_index'] == null && params['rollupIndex'] == null) { + if (params.rollup_index == null && params.rollupIndex == null) { const err = new this[kConfigurationError]('Missing required parameter: rollup_index or rollupIndex') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if ((params['rollup_index'] != null || params['rollupIndex'] != null) && (params['index'] == null)) { + if ((params.rollup_index != null || params.rollupIndex != null) && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, rollupIndex, rollup_index, ...querystring } = params + let { method, body, index, rollupIndex, rollup_index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + encodeURIComponent(rollup_index || rollupIndex) @@ -213,25 +213,25 @@ RollupApi.prototype.rollupSearch = function rollupRollupSearchApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_rollup_search' @@ -255,15 +255,15 @@ RollupApi.prototype.startJob = function rollupStartJobApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_start' @@ -282,15 +282,15 @@ RollupApi.prototype.stopJob = function rollupStopJobApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_stop' diff --git a/api/api/scripts_painless_execute.js b/api/api/scripts_painless_execute.js index b08c6d14a..fbe2f08be 100644 --- a/api/api/scripts_painless_execute.js +++ b/api/api/scripts_painless_execute.js @@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' } function scriptsPainlessExecuteApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_scripts' + '/' + 'painless' + '/' + '_execute' diff --git a/api/api/scroll.js b/api/api/scroll.js index 7ec1f059f..27b7eb78e 100644 --- a/api/api/scroll.js +++ b/api/api/scroll.js @@ -29,10 +29,10 @@ const snakeCase = { scrollId: 'scroll_id', restTotalHitsAsInt: 'rest_total_hits_ function scrollApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, scrollId, scroll_id, ...querystring } = params + let { method, body, scrollId, scroll_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((scroll_id || scrollId) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId) diff --git a/api/api/search.js b/api/api/search.js index 713827bcb..bf838fd28 100644 --- a/api/api/search.js +++ b/api/api/search.js @@ -30,15 +30,15 @@ function searchApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' diff --git a/api/api/search_shards.js b/api/api/search_shards.js index 7059004db..760bb03e9 100644 --- a/api/api/search_shards.js +++ b/api/api/search_shards.js @@ -29,10 +29,10 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'al function searchShardsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + '_search_shards' diff --git a/api/api/search_template.js b/api/api/search_template.js index a875c2712..9229b32b5 100644 --- a/api/api/search_template.js +++ b/api/api/search_template.js @@ -30,21 +30,21 @@ function searchTemplateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template' diff --git a/api/api/searchable_snapshots.js b/api/api/searchable_snapshots.js index a1ba82d0a..5b7e42b32 100644 --- a/api/api/searchable_snapshots.js +++ b/api/api/searchable_snapshots.js @@ -34,10 +34,10 @@ function SearchableSnapshotsApi (transport, ConfigurationError) { SearchableSnapshotsApi.prototype.clearCache = function searchableSnapshotsClearCacheApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'cache' + '/' + 'clear' @@ -61,29 +61,29 @@ SearchableSnapshotsApi.prototype.mount = function searchableSnapshotsMountApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if (params['snapshot'] != null && (params['repository'] == null)) { + if (params.snapshot != null && (params.repository == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: repository') return handleError(err, callback) } - var { method, body, repository, snapshot, ...querystring } = params + let { method, body, repository, snapshot, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_mount' @@ -102,15 +102,15 @@ SearchableSnapshotsApi.prototype.repositoryStats = function searchableSnapshotsR ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - var { method, body, repository, ...querystring } = params + let { method, body, repository, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_stats' @@ -128,10 +128,10 @@ SearchableSnapshotsApi.prototype.repositoryStats = function searchableSnapshotsR SearchableSnapshotsApi.prototype.stats = function searchableSnapshotsStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, index, ...querystring } = params + let { method, body, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null) { if (method == null) method = 'GET' path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'stats' diff --git a/api/api/security.js b/api/api/security.js index a0aed418b..389dd6d4a 100644 --- a/api/api/security.js +++ b/api/api/security.js @@ -34,10 +34,10 @@ function SecurityApi (transport, ConfigurationError) { SecurityApi.prototype.authenticate = function securityAuthenticateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_security' + '/' + '_authenticate' @@ -56,15 +56,15 @@ SecurityApi.prototype.changePassword = function securityChangePasswordApi (param ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, username, ...querystring } = params + let { method, body, username, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((username) != null) { if (method == null) method = 'PUT' path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_password' @@ -88,15 +88,15 @@ SecurityApi.prototype.clearApiKeyCache = function securityClearApiKeyCacheApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['ids'] == null) { + if (params.ids == null) { const err = new this[kConfigurationError]('Missing required parameter: ids') return handleError(err, callback) } - var { method, body, ids, ...querystring } = params + let { method, body, ids, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_security' + '/' + 'api_key' + '/' + encodeURIComponent(ids) + '/' + '_clear_cache' @@ -115,15 +115,15 @@ SecurityApi.prototype.clearCachedPrivileges = function securityClearCachedPrivil ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['application'] == null) { + if (params.application == null) { const err = new this[kConfigurationError]('Missing required parameter: application') return handleError(err, callback) } - var { method, body, application, ...querystring } = params + let { method, body, application, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + '_clear_cache' @@ -142,15 +142,15 @@ SecurityApi.prototype.clearCachedRealms = function securityClearCachedRealmsApi ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['realms'] == null) { + if (params.realms == null) { const err = new this[kConfigurationError]('Missing required parameter: realms') return handleError(err, callback) } - var { method, body, realms, ...querystring } = params + let { method, body, realms, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_security' + '/' + 'realm' + '/' + encodeURIComponent(realms) + '/' + '_clear_cache' @@ -169,15 +169,15 @@ SecurityApi.prototype.clearCachedRoles = function securityClearCachedRolesApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) + '/' + '_clear_cache' @@ -196,15 +196,15 @@ SecurityApi.prototype.createApiKey = function securityCreateApiKeyApi (params, o ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_security' + '/' + 'api_key' @@ -223,25 +223,25 @@ SecurityApi.prototype.deletePrivileges = function securityDeletePrivilegesApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['application'] == null) { + if (params.application == null) { const err = new this[kConfigurationError]('Missing required parameter: application') return handleError(err, callback) } - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } // check required url components - if (params['name'] != null && (params['application'] == null)) { + if (params.name != null && (params.application == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: application') return handleError(err, callback) } - var { method, body, application, name, ...querystring } = params + let { method, body, application, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name) @@ -260,15 +260,15 @@ SecurityApi.prototype.deleteRole = function securityDeleteRoleApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) @@ -287,15 +287,15 @@ SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name) @@ -314,15 +314,15 @@ SecurityApi.prototype.deleteUser = function securityDeleteUserApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['username'] == null) { + if (params.username == null) { const err = new this[kConfigurationError]('Missing required parameter: username') return handleError(err, callback) } - var { method, body, username, ...querystring } = params + let { method, body, username, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) @@ -341,15 +341,15 @@ SecurityApi.prototype.disableUser = function securityDisableUserApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['username'] == null) { + if (params.username == null) { const err = new this[kConfigurationError]('Missing required parameter: username') return handleError(err, callback) } - var { method, body, username, ...querystring } = params + let { method, body, username, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_disable' @@ -368,15 +368,15 @@ SecurityApi.prototype.enableUser = function securityEnableUserApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['username'] == null) { + if (params.username == null) { const err = new this[kConfigurationError]('Missing required parameter: username') return handleError(err, callback) } - var { method, body, username, ...querystring } = params + let { method, body, username, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_enable' @@ -394,10 +394,10 @@ SecurityApi.prototype.enableUser = function securityEnableUserApi (params, optio SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_security' + '/' + 'api_key' @@ -415,10 +415,10 @@ SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options SecurityApi.prototype.getBuiltinPrivileges = function securityGetBuiltinPrivilegesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_security' + '/' + 'privilege' + '/' + '_builtin' @@ -437,15 +437,15 @@ SecurityApi.prototype.getPrivileges = function securityGetPrivilegesApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required url components - if (params['name'] != null && (params['application'] == null)) { + if (params.name != null && (params.application == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: application') return handleError(err, callback) } - var { method, body, application, name, ...querystring } = params + let { method, body, application, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((application) != null && (name) != null) { if (method == null) method = 'GET' path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name) @@ -471,10 +471,10 @@ SecurityApi.prototype.getPrivileges = function securityGetPrivilegesApi (params, SecurityApi.prototype.getRole = function securityGetRoleApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) @@ -497,10 +497,10 @@ SecurityApi.prototype.getRole = function securityGetRoleApi (params, options, ca SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((name) != null) { if (method == null) method = 'GET' path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name) @@ -524,15 +524,15 @@ SecurityApi.prototype.getToken = function securityGetTokenApi (params, options, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token' @@ -550,10 +550,10 @@ SecurityApi.prototype.getToken = function securityGetTokenApi (params, options, SecurityApi.prototype.getUser = function securityGetUserApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, username, ...querystring } = params + let { method, body, username, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((username) != null) { if (method == null) method = 'GET' path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) @@ -576,10 +576,10 @@ SecurityApi.prototype.getUser = function securityGetUserApi (params, options, ca SecurityApi.prototype.getUserPrivileges = function securityGetUserPrivilegesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_security' + '/' + 'user' + '/' + '_privileges' @@ -598,15 +598,15 @@ SecurityApi.prototype.grantApiKey = function securityGrantApiKeyApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_security' + '/' + 'api_key' + '/' + 'grant' @@ -625,15 +625,15 @@ SecurityApi.prototype.hasPrivileges = function securityHasPrivilegesApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, user, ...querystring } = params + let { method, body, user, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((user) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(user) + '/' + '_has_privileges' @@ -657,15 +657,15 @@ SecurityApi.prototype.invalidateApiKey = function securityInvalidateApiKeyApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_security' + '/' + 'api_key' @@ -684,15 +684,15 @@ SecurityApi.prototype.invalidateToken = function securityInvalidateTokenApi (par ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token' @@ -711,15 +711,15 @@ SecurityApi.prototype.putPrivileges = function securityPutPrivilegesApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_security' + '/' + 'privilege' @@ -738,19 +738,19 @@ SecurityApi.prototype.putRole = function securityPutRoleApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) @@ -769,19 +769,19 @@ SecurityApi.prototype.putRoleMapping = function securityPutRoleMappingApi (param ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new this[kConfigurationError]('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, name, ...querystring } = params + let { method, body, name, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name) @@ -800,19 +800,19 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['username'] == null) { + if (params.username == null) { const err = new this[kConfigurationError]('Missing required parameter: username') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, username, ...querystring } = params + let { method, body, username, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) diff --git a/api/api/slm.js b/api/api/slm.js index 3947dc365..ba2b94fa5 100644 --- a/api/api/slm.js +++ b/api/api/slm.js @@ -35,15 +35,15 @@ SlmApi.prototype.deleteLifecycle = function slmDeleteLifecycleApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['policy_id'] == null && params['policyId'] == null) { + if (params.policy_id == null && params.policyId == null) { const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId') return handleError(err, callback) } - var { method, body, policyId, policy_id, ...querystring } = params + let { method, body, policyId, policy_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) @@ -62,15 +62,15 @@ SlmApi.prototype.executeLifecycle = function slmExecuteLifecycleApi (params, opt ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['policy_id'] == null && params['policyId'] == null) { + if (params.policy_id == null && params.policyId == null) { const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId') return handleError(err, callback) } - var { method, body, policyId, policy_id, ...querystring } = params + let { method, body, policyId, policy_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) + '/' + '_execute' @@ -88,10 +88,10 @@ SlmApi.prototype.executeLifecycle = function slmExecuteLifecycleApi (params, opt SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_slm' + '/' + '_execute_retention' @@ -109,10 +109,10 @@ SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, opt SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, policyId, policy_id, ...querystring } = params + let { method, body, policyId, policy_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((policy_id || policyId) != null) { if (method == null) method = 'GET' path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) @@ -135,10 +135,10 @@ SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, ca SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_slm' + '/' + 'stats' @@ -156,10 +156,10 @@ SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback) SlmApi.prototype.getStatus = function slmGetStatusApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_slm' + '/' + 'status' @@ -178,15 +178,15 @@ SlmApi.prototype.putLifecycle = function slmPutLifecycleApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['policy_id'] == null && params['policyId'] == null) { + if (params.policy_id == null && params.policyId == null) { const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId') return handleError(err, callback) } - var { method, body, policyId, policy_id, ...querystring } = params + let { method, body, policyId, policy_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) @@ -204,10 +204,10 @@ SlmApi.prototype.putLifecycle = function slmPutLifecycleApi (params, options, ca SlmApi.prototype.start = function slmStartApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_slm' + '/' + 'start' @@ -225,10 +225,10 @@ SlmApi.prototype.start = function slmStartApi (params, options, callback) { SlmApi.prototype.stop = function slmStopApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_slm' + '/' + 'stop' diff --git a/api/api/snapshot.js b/api/api/snapshot.js index 05d85977f..ddc78dcc6 100644 --- a/api/api/snapshot.js +++ b/api/api/snapshot.js @@ -35,15 +35,15 @@ SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - var { method, body, repository, ...querystring } = params + let { method, body, repository, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_cleanup' @@ -62,36 +62,36 @@ SnapshotApi.prototype.clone = function snapshotCloneApi (params, options, callba ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot') return handleError(err, callback) } - if (params['target_snapshot'] == null && params['targetSnapshot'] == null) { + if (params.target_snapshot == null && params.targetSnapshot == null) { const err = new this[kConfigurationError]('Missing required parameter: target_snapshot or targetSnapshot') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } // check required url components - if ((params['target_snapshot'] != null || params['targetSnapshot'] != null) && (params['snapshot'] == null || params['repository'] == null)) { + if ((params.target_snapshot != null || params.targetSnapshot != null) && (params.snapshot == null || params.repository == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: snapshot, repository') return handleError(err, callback) - } else if (params['snapshot'] != null && (params['repository'] == null)) { + } else if (params.snapshot != null && (params.repository == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: repository') return handleError(err, callback) } - var { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params + let { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_clone' + '/' + encodeURIComponent(target_snapshot || targetSnapshot) @@ -110,25 +110,25 @@ SnapshotApi.prototype.create = function snapshotCreateApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot') return handleError(err, callback) } // check required url components - if (params['snapshot'] != null && (params['repository'] == null)) { + if (params.snapshot != null && (params.repository == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: repository') return handleError(err, callback) } - var { method, body, repository, snapshot, ...querystring } = params + let { method, body, repository, snapshot, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) @@ -147,19 +147,19 @@ SnapshotApi.prototype.createRepository = function snapshotCreateRepositoryApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, repository, ...querystring } = params + let { method, body, repository, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) @@ -178,25 +178,25 @@ SnapshotApi.prototype.delete = function snapshotDeleteApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot') return handleError(err, callback) } // check required url components - if (params['snapshot'] != null && (params['repository'] == null)) { + if (params.snapshot != null && (params.repository == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: repository') return handleError(err, callback) } - var { method, body, repository, snapshot, ...querystring } = params + let { method, body, repository, snapshot, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) @@ -215,15 +215,15 @@ SnapshotApi.prototype.deleteRepository = function snapshotDeleteRepositoryApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - var { method, body, repository, ...querystring } = params + let { method, body, repository, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) @@ -242,25 +242,25 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback) ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot') return handleError(err, callback) } // check required url components - if (params['snapshot'] != null && (params['repository'] == null)) { + if (params.snapshot != null && (params.repository == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: repository') return handleError(err, callback) } - var { method, body, repository, snapshot, ...querystring } = params + let { method, body, repository, snapshot, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) @@ -278,10 +278,10 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback) SnapshotApi.prototype.getFeatures = function snapshotGetFeaturesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_snapshottable_features' @@ -299,10 +299,10 @@ SnapshotApi.prototype.getFeatures = function snapshotGetFeaturesApi (params, opt SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, repository, ...querystring } = params + let { method, body, repository, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((repository) != null) { if (method == null) method = 'GET' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) @@ -326,25 +326,25 @@ SnapshotApi.prototype.restore = function snapshotRestoreApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new this[kConfigurationError]('Missing required parameter: snapshot') return handleError(err, callback) } // check required url components - if (params['snapshot'] != null && (params['repository'] == null)) { + if (params.snapshot != null && (params.repository == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: repository') return handleError(err, callback) } - var { method, body, repository, snapshot, ...querystring } = params + let { method, body, repository, snapshot, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_restore' @@ -363,15 +363,15 @@ SnapshotApi.prototype.status = function snapshotStatusApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required url components - if (params['snapshot'] != null && (params['repository'] == null)) { + if (params.snapshot != null && (params.repository == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: repository') return handleError(err, callback) } - var { method, body, repository, snapshot, ...querystring } = params + let { method, body, repository, snapshot, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((repository) != null && (snapshot) != null) { if (method == null) method = 'GET' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_status' @@ -398,15 +398,15 @@ SnapshotApi.prototype.verifyRepository = function snapshotVerifyRepositoryApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new this[kConfigurationError]('Missing required parameter: repository') return handleError(err, callback) } - var { method, body, repository, ...querystring } = params + let { method, body, repository, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_verify' diff --git a/api/api/sql.js b/api/api/sql.js index db4c2d08f..543a8011a 100644 --- a/api/api/sql.js +++ b/api/api/sql.js @@ -35,15 +35,15 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_sql' + '/' + 'close' @@ -62,15 +62,15 @@ SqlApi.prototype.query = function sqlQueryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_sql' @@ -89,15 +89,15 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_sql' + '/' + 'translate' diff --git a/api/api/ssl.js b/api/api/ssl.js index 76f02913e..5ff91770c 100644 --- a/api/api/ssl.js +++ b/api/api/ssl.js @@ -34,10 +34,10 @@ function SslApi (transport, ConfigurationError) { SslApi.prototype.certificates = function sslCertificatesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_ssl' + '/' + 'certificates' diff --git a/api/api/tasks.js b/api/api/tasks.js index 576c36110..131279e80 100644 --- a/api/api/tasks.js +++ b/api/api/tasks.js @@ -34,10 +34,10 @@ function TasksApi (transport, ConfigurationError) { TasksApi.prototype.cancel = function tasksCancelApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, taskId, task_id, ...querystring } = params + let { method, body, taskId, task_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((task_id || taskId) != null) { if (method == null) method = 'POST' path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_cancel' @@ -61,15 +61,15 @@ TasksApi.prototype.get = function tasksGetApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['task_id'] == null && params['taskId'] == null) { + if (params.task_id == null && params.taskId == null) { const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId') return handleError(err, callback) } - var { method, body, taskId, task_id, ...querystring } = params + let { method, body, taskId, task_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId) @@ -87,10 +87,10 @@ TasksApi.prototype.get = function tasksGetApi (params, options, callback) { TasksApi.prototype.list = function tasksListApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_tasks' diff --git a/api/api/termvectors.js b/api/api/termvectors.js index 257c84c82..18ef7425f 100644 --- a/api/api/termvectors.js +++ b/api/api/termvectors.js @@ -30,15 +30,15 @@ function termvectorsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - var { method, body, index, id, type, ...querystring } = params + let { method, body, index, id, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_termvectors' diff --git a/api/api/text_structure.js b/api/api/text_structure.js index fbade3c7b..4a5509adf 100644 --- a/api/api/text_structure.js +++ b/api/api/text_structure.js @@ -35,15 +35,15 @@ TextStructureApi.prototype.findStructure = function textStructureFindStructureAp ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_text_structure' + '/' + 'find_structure' diff --git a/api/api/transform.js b/api/api/transform.js index 3ff90890b..613f7a66f 100644 --- a/api/api/transform.js +++ b/api/api/transform.js @@ -35,15 +35,15 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - var { method, body, transformId, transform_id, ...querystring } = params + let { method, body, transformId, transform_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) @@ -61,10 +61,10 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p TransformApi.prototype.getTransform = function transformGetTransformApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, transformId, transform_id, ...querystring } = params + let { method, body, transformId, transform_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((transform_id || transformId) != null) { if (method == null) method = 'GET' path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) @@ -88,15 +88,15 @@ TransformApi.prototype.getTransformStats = function transformGetTransformStatsAp ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - var { method, body, transformId, transform_id, ...querystring } = params + let { method, body, transformId, transform_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats' @@ -115,15 +115,15 @@ TransformApi.prototype.previewTransform = function transformPreviewTransformApi ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_transform' + '/' + '_preview' @@ -142,19 +142,19 @@ TransformApi.prototype.putTransform = function transformPutTransformApi (params, ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, transformId, transform_id, ...querystring } = params + let { method, body, transformId, transform_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) @@ -173,15 +173,15 @@ TransformApi.prototype.startTransform = function transformStartTransformApi (par ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - var { method, body, transformId, transform_id, ...querystring } = params + let { method, body, transformId, transform_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start' @@ -200,15 +200,15 @@ TransformApi.prototype.stopTransform = function transformStopTransformApi (param ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - var { method, body, transformId, transform_id, ...querystring } = params + let { method, body, transformId, transform_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop' @@ -227,19 +227,19 @@ TransformApi.prototype.updateTransform = function transformUpdateTransformApi (p ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, transformId, transform_id, ...querystring } = params + let { method, body, transformId, transform_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update' diff --git a/api/api/update.js b/api/api/update.js index aae88a27a..edc0164bf 100644 --- a/api/api/update.js +++ b/api/api/update.js @@ -30,23 +30,23 @@ function updateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new this[kConfigurationError]('Missing required parameter: body') return handleError(err, callback) } - var { method, body, id, index, type, ...querystring } = params + let { method, body, id, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null && (id) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_update' diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js index afc53845d..6305226d8 100644 --- a/api/api/update_by_query.js +++ b/api/api/update_by_query.js @@ -30,21 +30,21 @@ function updateByQueryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new this[kConfigurationError]('Missing required parameter: index') return handleError(err, callback) } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new this[kConfigurationError]('Missing required parameter of the url: index') return handleError(err, callback) } - var { method, body, index, type, ...querystring } = params + let { method, body, index, type, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((index) != null && (type) != null) { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query' diff --git a/api/api/update_by_query_rethrottle.js b/api/api/update_by_query_rethrottle.js index a5c8145af..2a9ebf90c 100644 --- a/api/api/update_by_query_rethrottle.js +++ b/api/api/update_by_query_rethrottle.js @@ -30,19 +30,19 @@ function updateByQueryRethrottleApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['task_id'] == null && params['taskId'] == null) { + if (params.task_id == null && params.taskId == null) { const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId') return handleError(err, callback) } - if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) { + if (params.requests_per_second == null && params.requestsPerSecond == null) { const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond') return handleError(err, callback) } - var { method, body, taskId, task_id, ...querystring } = params + let { method, body, taskId, task_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_update_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle' diff --git a/api/api/watcher.js b/api/api/watcher.js index ae3e78dc4..a426faa4a 100644 --- a/api/api/watcher.js +++ b/api/api/watcher.js @@ -35,21 +35,21 @@ WatcherApi.prototype.ackWatch = function watcherAckWatchApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['watch_id'] == null && params['watchId'] == null) { + if (params.watch_id == null && params.watchId == null) { const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId') return handleError(err, callback) } // check required url components - if ((params['action_id'] != null || params['actionId'] != null) && ((params['watch_id'] == null && params['watchId'] == null))) { + if ((params.action_id != null || params.actionId != null) && ((params.watch_id == null && params.watchId == null))) { const err = new this[kConfigurationError]('Missing required parameter of the url: watch_id') return handleError(err, callback) } - var { method, body, watchId, watch_id, actionId, action_id, ...querystring } = params + let { method, body, watchId, watch_id, actionId, action_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((watch_id || watchId) != null && (action_id || actionId) != null) { if (method == null) method = 'PUT' path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_ack' + '/' + encodeURIComponent(action_id || actionId) @@ -73,15 +73,15 @@ WatcherApi.prototype.activateWatch = function watcherActivateWatchApi (params, o ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['watch_id'] == null && params['watchId'] == null) { + if (params.watch_id == null && params.watchId == null) { const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId') return handleError(err, callback) } - var { method, body, watchId, watch_id, ...querystring } = params + let { method, body, watchId, watch_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_activate' @@ -100,15 +100,15 @@ WatcherApi.prototype.deactivateWatch = function watcherDeactivateWatchApi (param ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['watch_id'] == null && params['watchId'] == null) { + if (params.watch_id == null && params.watchId == null) { const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId') return handleError(err, callback) } - var { method, body, watchId, watch_id, ...querystring } = params + let { method, body, watchId, watch_id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_deactivate' @@ -127,15 +127,15 @@ WatcherApi.prototype.deleteWatch = function watcherDeleteWatchApi (params, optio ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'DELETE' path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id) @@ -153,10 +153,10 @@ WatcherApi.prototype.deleteWatch = function watcherDeleteWatchApi (params, optio WatcherApi.prototype.executeWatch = function watcherExecuteWatchApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((id) != null) { if (method == null) method = 'PUT' path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id) + '/' + '_execute' @@ -180,15 +180,15 @@ WatcherApi.prototype.getWatch = function watcherGetWatchApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id) @@ -207,15 +207,15 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca ;[params, options, callback] = normalizeArguments(params, options, callback) // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new this[kConfigurationError]('Missing required parameter: id') return handleError(err, callback) } - var { method, body, id, ...querystring } = params + let { method, body, id, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'PUT' path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id) @@ -233,10 +233,10 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca WatcherApi.prototype.queryWatches = function watcherQueryWatchesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = body == null ? 'GET' : 'POST' path = '/' + '_watcher' + '/' + '_query' + '/' + 'watches' @@ -254,10 +254,10 @@ WatcherApi.prototype.queryWatches = function watcherQueryWatchesApi (params, opt WatcherApi.prototype.start = function watcherStartApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_watcher' + '/' + '_start' @@ -275,10 +275,10 @@ WatcherApi.prototype.start = function watcherStartApi (params, options, callback WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, metric, ...querystring } = params + let { method, body, metric, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if ((metric) != null) { if (method == null) method = 'GET' path = '/' + '_watcher' + '/' + 'stats' + '/' + encodeURIComponent(metric) @@ -301,10 +301,10 @@ WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback WatcherApi.prototype.stop = function watcherStopApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'POST' path = '/' + '_watcher' + '/' + '_stop' diff --git a/api/api/xpack.js b/api/api/xpack.js index 47c619fa7..39a179d84 100644 --- a/api/api/xpack.js +++ b/api/api/xpack.js @@ -34,10 +34,10 @@ function XpackApi (transport, ConfigurationError) { XpackApi.prototype.info = function xpackInfoApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_xpack' @@ -55,10 +55,10 @@ XpackApi.prototype.info = function xpackInfoApi (params, options, callback) { XpackApi.prototype.usage = function xpackUsageApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) - var { method, body, ...querystring } = params + let { method, body, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - var path = '' + let path = '' if (method == null) method = 'GET' path = '/' + '_xpack' + '/' + 'usage'