From bb05668a44336be6bc0db351c534ff948980e6d7 Mon Sep 17 00:00:00 2001 From: Tomas Della Vedova Date: Thu, 23 Jul 2020 12:27:18 +0200 Subject: [PATCH 1/8] Updated license header (#1267) --- api/api/async_search.delete.js | 23 +++++- api/api/async_search.get.js | 23 +++++- api/api/async_search.submit.js | 21 ++++- .../autoscaling.delete_autoscaling_policy.js | 23 +++++- .../autoscaling.get_autoscaling_decision.js | 21 ++++- api/api/autoscaling.get_autoscaling_policy.js | 23 +++++- api/api/autoscaling.put_autoscaling_policy.js | 25 ++++-- api/api/bulk.js | 25 ++++-- api/api/cat.aliases.js | 21 ++++- api/api/cat.allocation.js | 21 ++++- api/api/cat.count.js | 21 ++++- api/api/cat.fielddata.js | 21 ++++- api/api/cat.health.js | 21 ++++- api/api/cat.help.js | 21 ++++- api/api/cat.indices.js | 21 ++++- api/api/cat.master.js | 21 ++++- api/api/cat.ml_data_frame_analytics.js | 21 ++++- api/api/cat.ml_datafeeds.js | 21 ++++- api/api/cat.ml_jobs.js | 21 ++++- api/api/cat.ml_trained_models.js | 21 ++++- api/api/cat.nodeattrs.js | 21 ++++- api/api/cat.nodes.js | 21 ++++- api/api/cat.pending_tasks.js | 21 ++++- api/api/cat.plugins.js | 21 ++++- api/api/cat.recovery.js | 21 ++++- api/api/cat.repositories.js | 21 ++++- api/api/cat.segments.js | 21 ++++- api/api/cat.shards.js | 21 ++++- api/api/cat.snapshots.js | 21 ++++- api/api/cat.tasks.js | 21 ++++- api/api/cat.templates.js | 21 ++++- api/api/cat.thread_pool.js | 21 ++++- api/api/cat.transforms.js | 21 ++++- api/api/ccr.delete_auto_follow_pattern.js | 23 +++++- api/api/ccr.follow.js | 25 ++++-- api/api/ccr.follow_info.js | 23 +++++- api/api/ccr.follow_stats.js | 23 +++++- api/api/ccr.forget_follower.js | 25 ++++-- api/api/ccr.get_auto_follow_pattern.js | 21 ++++- api/api/ccr.pause_auto_follow_pattern.js | 23 +++++- api/api/ccr.pause_follow.js | 23 +++++- api/api/ccr.put_auto_follow_pattern.js | 25 ++++-- api/api/ccr.resume_auto_follow_pattern.js | 23 +++++- api/api/ccr.resume_follow.js | 23 +++++- api/api/ccr.stats.js | 21 ++++- api/api/ccr.unfollow.js | 23 +++++- api/api/clear_scroll.js | 21 ++++- api/api/cluster.allocation_explain.js | 21 ++++- api/api/cluster.delete_component_template.js | 23 +++++- ...cluster.delete_voting_config_exclusions.js | 21 ++++- api/api/cluster.exists_component_template.js | 23 +++++- api/api/cluster.get_component_template.js | 21 ++++- api/api/cluster.get_settings.js | 21 ++++- api/api/cluster.health.js | 21 ++++- api/api/cluster.pending_tasks.js | 21 ++++- .../cluster.post_voting_config_exclusions.js | 21 ++++- api/api/cluster.put_component_template.js | 25 ++++-- api/api/cluster.put_settings.js | 23 +++++- api/api/cluster.remote_info.js | 21 ++++- api/api/cluster.reroute.js | 21 ++++- api/api/cluster.state.js | 23 +++++- api/api/cluster.stats.js | 21 ++++- api/api/count.js | 23 +++++- api/api/create.js | 27 +++++-- .../dangling_indices.delete_dangling_index.js | 23 +++++- .../dangling_indices.import_dangling_index.js | 23 +++++- .../dangling_indices.list_dangling_indices.js | 21 ++++- api/api/delete.js | 25 ++++-- api/api/delete_by_query.js | 27 +++++-- api/api/delete_by_query_rethrottle.js | 25 ++++-- api/api/delete_script.js | 23 +++++- api/api/enrich.delete_policy.js | 23 +++++- api/api/enrich.execute_policy.js | 23 +++++- api/api/enrich.get_policy.js | 21 ++++- api/api/enrich.put_policy.js | 25 ++++-- api/api/enrich.stats.js | 21 ++++- api/api/eql.delete.js | 23 +++++- api/api/eql.get.js | 23 +++++- api/api/eql.search.js | 25 ++++-- api/api/exists.js | 25 ++++-- api/api/exists_source.js | 29 +++++-- api/api/explain.js | 25 ++++-- api/api/field_caps.js | 21 ++++- api/api/get.js | 25 ++++-- api/api/get_script.js | 23 +++++- api/api/get_script_context.js | 21 ++++- api/api/get_script_languages.js | 21 ++++- api/api/get_source.js | 25 ++++-- api/api/graph.explore.js | 25 ++++-- api/api/ilm.delete_lifecycle.js | 23 +++++- api/api/ilm.explain_lifecycle.js | 23 +++++- api/api/ilm.get_lifecycle.js | 21 ++++- api/api/ilm.get_status.js | 21 ++++- api/api/ilm.move_to_step.js | 23 +++++- api/api/ilm.put_lifecycle.js | 23 +++++- api/api/ilm.remove_policy.js | 23 +++++- api/api/ilm.retry.js | 23 +++++- api/api/ilm.start.js | 21 ++++- api/api/ilm.stop.js | 21 ++++- api/api/index.js | 25 ++++-- api/api/indices.add_block.js | 27 +++++-- api/api/indices.analyze.js | 21 ++++- api/api/indices.clear_cache.js | 21 ++++- api/api/indices.clone.js | 27 +++++-- api/api/indices.close.js | 23 +++++- api/api/indices.create.js | 23 +++++- api/api/indices.create_data_stream.js | 23 +++++- api/api/indices.data_streams_stats.js | 21 ++++- api/api/indices.delete.js | 23 +++++- api/api/indices.delete_alias.js | 27 +++++-- api/api/indices.delete_data_stream.js | 23 +++++- api/api/indices.delete_index_template.js | 23 +++++- api/api/indices.delete_template.js | 23 +++++- api/api/indices.exists.js | 23 +++++- api/api/indices.exists_alias.js | 23 +++++- api/api/indices.exists_index_template.js | 23 +++++- api/api/indices.exists_template.js | 23 +++++- api/api/indices.exists_type.js | 27 +++++-- api/api/indices.flush.js | 21 ++++- api/api/indices.flush_synced.js | 21 ++++- api/api/indices.forcemerge.js | 21 ++++- api/api/indices.freeze.js | 23 +++++- api/api/indices.get.js | 23 +++++- api/api/indices.get_alias.js | 21 ++++- api/api/indices.get_data_stream.js | 21 ++++- api/api/indices.get_field_mapping.js | 23 +++++- api/api/indices.get_index_template.js | 21 ++++- api/api/indices.get_mapping.js | 21 ++++- api/api/indices.get_settings.js | 21 ++++- api/api/indices.get_template.js | 21 ++++- api/api/indices.get_upgrade.js | 21 ++++- api/api/indices.open.js | 23 +++++- api/api/indices.put_alias.js | 27 +++++-- api/api/indices.put_index_template.js | 25 ++++-- api/api/indices.put_mapping.js | 23 +++++- api/api/indices.put_settings.js | 23 +++++- api/api/indices.put_template.js | 25 ++++-- api/api/indices.recovery.js | 21 ++++- api/api/indices.refresh.js | 21 ++++- api/api/indices.reload_search_analyzers.js | 23 +++++- api/api/indices.resolve_index.js | 23 +++++- api/api/indices.rollover.js | 25 ++++-- api/api/indices.segments.js | 21 ++++- api/api/indices.shard_stores.js | 21 ++++- api/api/indices.shrink.js | 27 +++++-- api/api/indices.simulate_index_template.js | 23 +++++- api/api/indices.simulate_template.js | 21 ++++- api/api/indices.split.js | 27 +++++-- api/api/indices.stats.js | 21 ++++- api/api/indices.unfreeze.js | 23 +++++- api/api/indices.update_aliases.js | 23 +++++- api/api/indices.upgrade.js | 21 ++++- api/api/indices.validate_query.js | 23 +++++- api/api/info.js | 21 ++++- api/api/ingest.delete_pipeline.js | 23 +++++- api/api/ingest.get_pipeline.js | 21 ++++- api/api/ingest.processor_grok.js | 21 ++++- api/api/ingest.put_pipeline.js | 25 ++++-- api/api/ingest.simulate.js | 23 +++++- api/api/license.delete.js | 21 ++++- api/api/license.get.js | 21 ++++- api/api/license.get_basic_status.js | 21 ++++- api/api/license.get_trial_status.js | 21 ++++- api/api/license.post.js | 21 ++++- api/api/license.post_start_basic.js | 21 ++++- api/api/license.post_start_trial.js | 21 ++++- api/api/mget.js | 25 ++++-- api/api/migration.deprecations.js | 21 ++++- api/api/ml.close_job.js | 23 +++++- api/api/ml.delete_calendar.js | 23 +++++- api/api/ml.delete_calendar_event.js | 27 +++++-- api/api/ml.delete_calendar_job.js | 27 +++++-- api/api/ml.delete_data_frame_analytics.js | 23 +++++- api/api/ml.delete_datafeed.js | 23 +++++- api/api/ml.delete_expired_data.js | 21 ++++- api/api/ml.delete_filter.js | 23 +++++- api/api/ml.delete_forecast.js | 25 ++++-- api/api/ml.delete_job.js | 23 +++++- api/api/ml.delete_model_snapshot.js | 27 +++++-- api/api/ml.delete_trained_model.js | 23 +++++- api/api/ml.estimate_model_memory.js | 23 +++++- api/api/ml.evaluate_data_frame.js | 23 +++++- api/api/ml.explain_data_frame_analytics.js | 21 ++++- api/api/ml.find_file_structure.js | 23 +++++- api/api/ml.flush_job.js | 23 +++++- api/api/ml.forecast.js | 23 +++++- api/api/ml.get_buckets.js | 25 ++++-- api/api/ml.get_calendar_events.js | 23 +++++- api/api/ml.get_calendars.js | 21 ++++- api/api/ml.get_categories.js | 25 ++++-- api/api/ml.get_data_frame_analytics.js | 21 ++++- api/api/ml.get_data_frame_analytics_stats.js | 21 ++++- api/api/ml.get_datafeed_stats.js | 21 ++++- api/api/ml.get_datafeeds.js | 21 ++++- api/api/ml.get_filters.js | 21 ++++- api/api/ml.get_influencers.js | 23 +++++- api/api/ml.get_job_stats.js | 21 ++++- api/api/ml.get_jobs.js | 21 ++++- api/api/ml.get_model_snapshots.js | 25 ++++-- api/api/ml.get_overall_buckets.js | 23 +++++- api/api/ml.get_records.js | 23 +++++- api/api/ml.get_trained_models.js | 21 ++++- api/api/ml.get_trained_models_stats.js | 21 ++++- api/api/ml.info.js | 21 ++++- api/api/ml.open_job.js | 23 +++++- api/api/ml.post_calendar_events.js | 25 ++++-- api/api/ml.post_data.js | 25 ++++-- api/api/ml.preview_datafeed.js | 23 +++++- api/api/ml.put_calendar.js | 23 +++++- api/api/ml.put_calendar_job.js | 27 +++++-- api/api/ml.put_data_frame_analytics.js | 25 ++++-- api/api/ml.put_datafeed.js | 25 ++++-- api/api/ml.put_filter.js | 25 ++++-- api/api/ml.put_job.js | 25 ++++-- api/api/ml.put_trained_model.js | 25 ++++-- api/api/ml.revert_model_snapshot.js | 27 +++++-- api/api/ml.set_upgrade_mode.js | 21 ++++- api/api/ml.start_data_frame_analytics.js | 23 +++++- api/api/ml.start_datafeed.js | 23 +++++- api/api/ml.stop_data_frame_analytics.js | 23 +++++- api/api/ml.stop_datafeed.js | 23 +++++- api/api/ml.update_data_frame_analytics.js | 25 ++++-- api/api/ml.update_datafeed.js | 25 ++++-- api/api/ml.update_filter.js | 25 ++++-- api/api/ml.update_job.js | 25 ++++-- api/api/ml.update_model_snapshot.js | 29 +++++-- api/api/ml.validate.js | 23 +++++- api/api/ml.validate_detector.js | 23 +++++- api/api/monitoring.bulk.js | 23 +++++- api/api/msearch.js | 25 ++++-- api/api/msearch_template.js | 25 ++++-- api/api/mtermvectors.js | 23 +++++- api/api/nodes.hot_threads.js | 21 ++++- api/api/nodes.info.js | 21 ++++- api/api/nodes.reload_secure_settings.js | 21 ++++- api/api/nodes.stats.js | 21 ++++- api/api/nodes.usage.js | 21 ++++- api/api/ping.js | 21 ++++- api/api/put_script.js | 27 +++++-- api/api/rank_eval.js | 23 +++++- api/api/reindex.js | 23 +++++- api/api/reindex_rethrottle.js | 25 ++++-- api/api/render_search_template.js | 21 ++++- api/api/rollup.delete_job.js | 23 +++++- api/api/rollup.get_jobs.js | 21 ++++- api/api/rollup.get_rollup_caps.js | 21 ++++- api/api/rollup.get_rollup_index_caps.js | 23 +++++- api/api/rollup.put_job.js | 25 ++++-- api/api/rollup.rollup_search.js | 27 +++++-- api/api/rollup.start_job.js | 23 +++++- api/api/rollup.stop_job.js | 23 +++++- api/api/scripts_painless_execute.js | 21 ++++- api/api/scroll.js | 21 ++++- api/api/search.js | 23 +++++- api/api/search_shards.js | 21 ++++- api/api/search_template.js | 25 ++++-- api/api/searchable_snapshots.clear_cache.js | 21 ++++- api/api/searchable_snapshots.mount.js | 29 +++++-- .../searchable_snapshots.repository_stats.js | 23 +++++- api/api/searchable_snapshots.stats.js | 21 ++++- api/api/security.authenticate.js | 21 ++++- api/api/security.change_password.js | 23 +++++- api/api/security.clear_cached_privileges.js | 23 +++++- api/api/security.clear_cached_realms.js | 23 +++++- api/api/security.clear_cached_roles.js | 23 +++++- api/api/security.create_api_key.js | 23 +++++- api/api/security.delete_privileges.js | 27 +++++-- api/api/security.delete_role.js | 23 +++++- api/api/security.delete_role_mapping.js | 23 +++++- api/api/security.delete_user.js | 23 +++++- api/api/security.disable_user.js | 23 +++++- api/api/security.enable_user.js | 23 +++++- api/api/security.get_api_key.js | 21 ++++- api/api/security.get_builtin_privileges.js | 21 ++++- api/api/security.get_privileges.js | 23 +++++- api/api/security.get_role.js | 21 ++++- api/api/security.get_role_mapping.js | 21 ++++- api/api/security.get_token.js | 23 +++++- api/api/security.get_user.js | 21 ++++- api/api/security.get_user_privileges.js | 21 ++++- api/api/security.has_privileges.js | 23 +++++- api/api/security.invalidate_api_key.js | 23 +++++- api/api/security.invalidate_token.js | 23 +++++- api/api/security.put_privileges.js | 23 +++++- api/api/security.put_role.js | 25 ++++-- api/api/security.put_role_mapping.js | 25 ++++-- api/api/security.put_user.js | 25 ++++-- api/api/slm.delete_lifecycle.js | 23 +++++- api/api/slm.execute_lifecycle.js | 23 +++++- api/api/slm.execute_retention.js | 21 ++++- api/api/slm.get_lifecycle.js | 21 ++++- api/api/slm.get_stats.js | 21 ++++- api/api/slm.get_status.js | 21 ++++- api/api/slm.put_lifecycle.js | 23 +++++- api/api/slm.start.js | 21 ++++- api/api/slm.stop.js | 21 ++++- api/api/snapshot.cleanup_repository.js | 23 +++++- api/api/snapshot.create.js | 27 +++++-- api/api/snapshot.create_repository.js | 25 ++++-- api/api/snapshot.delete.js | 27 +++++-- api/api/snapshot.delete_repository.js | 23 +++++- api/api/snapshot.get.js | 27 +++++-- api/api/snapshot.get_repository.js | 21 ++++- api/api/snapshot.restore.js | 27 +++++-- api/api/snapshot.status.js | 23 +++++- api/api/snapshot.verify_repository.js | 23 +++++- api/api/sql.clear_cursor.js | 23 +++++- api/api/sql.query.js | 23 +++++- api/api/sql.translate.js | 23 +++++- api/api/ssl.certificates.js | 21 ++++- api/api/tasks.cancel.js | 21 ++++- api/api/tasks.get.js | 23 +++++- api/api/tasks.list.js | 21 ++++- api/api/termvectors.js | 23 +++++- api/api/transform.delete_transform.js | 23 +++++- api/api/transform.get_transform.js | 21 ++++- api/api/transform.get_transform_stats.js | 23 +++++- api/api/transform.preview_transform.js | 23 +++++- api/api/transform.put_transform.js | 25 ++++-- api/api/transform.start_transform.js | 23 +++++- api/api/transform.stop_transform.js | 23 +++++- api/api/transform.update_transform.js | 25 ++++-- api/api/update.js | 27 +++++-- api/api/update_by_query.js | 25 ++++-- api/api/update_by_query_rethrottle.js | 25 ++++-- api/api/watcher.ack_watch.js | 25 ++++-- api/api/watcher.activate_watch.js | 23 +++++- api/api/watcher.deactivate_watch.js | 23 +++++- api/api/watcher.delete_watch.js | 23 +++++- api/api/watcher.execute_watch.js | 21 ++++- api/api/watcher.get_watch.js | 23 +++++- api/api/watcher.put_watch.js | 23 +++++- api/api/watcher.start.js | 21 ++++- api/api/watcher.stats.js | 21 ++++- api/api/watcher.stop.js | 21 ++++- api/api/xpack.info.js | 21 ++++- api/api/xpack.usage.js | 21 ++++- api/index.js | 21 ++++- api/kibana.d.ts | 21 ++++- api/requestParams.d.ts | 21 ++++- index.d.ts | 21 ++++- index.js | 21 ++++- index.mjs | 19 +++++ lib/Connection.d.ts | 21 ++++- lib/Connection.js | 21 ++++- lib/Helpers.d.ts | 21 ++++- lib/Helpers.js | 21 ++++- lib/Serializer.d.ts | 21 ++++- lib/Serializer.js | 21 ++++- lib/Transport.d.ts | 21 ++++- lib/Transport.js | 25 ++++-- lib/errors.d.ts | 21 ++++- lib/errors.js | 21 ++++- lib/pool/BaseConnectionPool.js | 21 ++++- lib/pool/CloudConnectionPool.js | 21 ++++- lib/pool/ConnectionPool.js | 21 ++++- lib/pool/index.d.ts | 21 ++++- lib/pool/index.js | 21 ++++- scripts/generate.js | 21 ++++- scripts/utils/clone-es.js | 21 ++++- scripts/utils/generateApis.js | 46 +++++++++-- scripts/utils/generateDocs.js | 23 +++++- scripts/utils/generateMain.js | 78 +++++++++++++------ scripts/utils/generateRequestTypes.js | 42 ++++++++-- scripts/utils/index.js | 21 ++++- test/acceptance/resurrect.test.js | 21 ++++- test/acceptance/sniff.test.js | 21 ++++- test/integration/helper.js | 21 ++++- test/integration/helpers/bulk.test.js | 21 ++++- test/integration/helpers/msearch.test.js | 21 ++++- test/integration/helpers/scroll.test.js | 21 ++++- test/integration/helpers/search.test.js | 21 ++++- test/integration/index.js | 21 ++++- test/integration/test-runner.js | 21 ++++- test/types/api-response-body.test-d.ts | 21 ++++- test/types/api-response.test-d.ts | 21 ++++- test/types/client-options.test-d.ts | 21 ++++- test/types/client.test-d.ts | 21 ++++- test/types/connection-pool.test-d.ts | 21 ++++- test/types/connection.test-d.ts | 21 ++++- test/types/errors.test-d.ts | 21 ++++- test/types/helpers.test-d.ts | 21 ++++- test/types/kibana.test-d.ts | 21 ++++- test/types/serializer.test-d.ts | 21 ++++- test/types/transport.test-d.ts | 21 ++++- test/unit/api-async.js | 21 ++++- test/unit/api.test.js | 21 ++++- test/unit/base-connection-pool.test.js | 21 ++++- test/unit/child.test.js | 21 ++++- test/unit/client.test.js | 25 ++++-- test/unit/cloud-connection-pool.test.js | 21 ++++- test/unit/connection-pool.test.js | 21 ++++- test/unit/connection.test.js | 23 +++++- test/unit/errors.test.js | 21 ++++- test/unit/events.test.js | 21 ++++- test/unit/helpers/bulk.test.js | 23 +++++- test/unit/helpers/msearch.test.js | 21 ++++- test/unit/helpers/scroll.test.js | 21 ++++- test/unit/helpers/search.test.js | 21 ++++- test/unit/selectors.test.js | 21 ++++- test/unit/serializer.test.js | 21 ++++- test/unit/transport.test.js | 21 ++++- test/utils/MockConnection.js | 21 ++++- test/utils/buildCluster.js | 21 ++++- test/utils/buildServer.js | 21 ++++- test/utils/index.js | 21 ++++- 406 files changed, 7697 insertions(+), 1558 deletions(-) diff --git a/api/api/async_search.delete.js b/api/api/async_search.delete.js index 909f3a230..f2f24cd0a 100644 --- a/api/api/async_search.delete.js +++ b/api/api/async_search.delete.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildAsyncSearchDelete (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/async_search.get.js b/api/api/async_search.get.js index e512e5ce3..9a68f5552 100644 --- a/api/api/async_search.get.js +++ b/api/api/async_search.get.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -41,7 +56,7 @@ function buildAsyncSearchGet (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/async_search.submit.js b/api/api/async_search.submit.js index 30d408051..99df278ef 100644 --- a/api/api/async_search.submit.js +++ b/api/api/async_search.submit.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/autoscaling.delete_autoscaling_policy.js b/api/api/autoscaling.delete_autoscaling_policy.js index 76d09d1d5..b0e8936da 100644 --- a/api/api/autoscaling.delete_autoscaling_policy.js +++ b/api/api/autoscaling.delete_autoscaling_policy.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildAutoscalingDeleteAutoscalingPolicy (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/autoscaling.get_autoscaling_decision.js b/api/api/autoscaling.get_autoscaling_decision.js index 9bd7388a7..268e9f5ed 100644 --- a/api/api/autoscaling.get_autoscaling_decision.js +++ b/api/api/autoscaling.get_autoscaling_decision.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/autoscaling.get_autoscaling_policy.js b/api/api/autoscaling.get_autoscaling_policy.js index 0a85e303b..8300ead29 100644 --- a/api/api/autoscaling.get_autoscaling_policy.js +++ b/api/api/autoscaling.get_autoscaling_policy.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildAutoscalingGetAutoscalingPolicy (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/autoscaling.put_autoscaling_policy.js b/api/api/autoscaling.put_autoscaling_policy.js index 6a45c7648..cc57bdad8 100644 --- a/api/api/autoscaling.put_autoscaling_policy.js +++ b/api/api/autoscaling.put_autoscaling_policy.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildAutoscalingPutAutoscalingPolicy (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/bulk.js b/api/api/bulk.js index c97ee719f..50f2504b0 100644 --- a/api/api/bulk.js +++ b/api/api/bulk.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -56,13 +71,13 @@ function buildBulk (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/cat.aliases.js b/api/api/cat.aliases.js index fe0675fbb..f6d5a3d67 100644 --- a/api/api/cat.aliases.js +++ b/api/api/cat.aliases.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.allocation.js b/api/api/cat.allocation.js index 9bed54887..00a02a80f 100644 --- a/api/api/cat.allocation.js +++ b/api/api/cat.allocation.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.count.js b/api/api/cat.count.js index 10cf6fd2c..600dcfaa2 100644 --- a/api/api/cat.count.js +++ b/api/api/cat.count.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.fielddata.js b/api/api/cat.fielddata.js index e8767eb00..cd6aa94c2 100644 --- a/api/api/cat.fielddata.js +++ b/api/api/cat.fielddata.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.health.js b/api/api/cat.health.js index c655333e7..ba2274746 100644 --- a/api/api/cat.health.js +++ b/api/api/cat.health.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.help.js b/api/api/cat.help.js index d16f5ca1f..472aee216 100644 --- a/api/api/cat.help.js +++ b/api/api/cat.help.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.indices.js b/api/api/cat.indices.js index 53cabe4a3..4b2e7d140 100644 --- a/api/api/cat.indices.js +++ b/api/api/cat.indices.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.master.js b/api/api/cat.master.js index 296a82aa5..645f5cffd 100644 --- a/api/api/cat.master.js +++ b/api/api/cat.master.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.ml_data_frame_analytics.js b/api/api/cat.ml_data_frame_analytics.js index 18b071636..6bbec58a3 100644 --- a/api/api/cat.ml_data_frame_analytics.js +++ b/api/api/cat.ml_data_frame_analytics.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.ml_datafeeds.js b/api/api/cat.ml_datafeeds.js index 988d0b094..5d10b0c7f 100644 --- a/api/api/cat.ml_datafeeds.js +++ b/api/api/cat.ml_datafeeds.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.ml_jobs.js b/api/api/cat.ml_jobs.js index 2311c796b..b8048ead8 100644 --- a/api/api/cat.ml_jobs.js +++ b/api/api/cat.ml_jobs.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.ml_trained_models.js b/api/api/cat.ml_trained_models.js index 4249d5f19..befcdfeb1 100644 --- a/api/api/cat.ml_trained_models.js +++ b/api/api/cat.ml_trained_models.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.nodeattrs.js b/api/api/cat.nodeattrs.js index c59442ea5..b444d2d6d 100644 --- a/api/api/cat.nodeattrs.js +++ b/api/api/cat.nodeattrs.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.nodes.js b/api/api/cat.nodes.js index 01923de06..12f67096f 100644 --- a/api/api/cat.nodes.js +++ b/api/api/cat.nodes.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.pending_tasks.js b/api/api/cat.pending_tasks.js index 10f6b5ab0..b3686d322 100644 --- a/api/api/cat.pending_tasks.js +++ b/api/api/cat.pending_tasks.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.plugins.js b/api/api/cat.plugins.js index 709bc13cf..fcfc2ba4e 100644 --- a/api/api/cat.plugins.js +++ b/api/api/cat.plugins.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.recovery.js b/api/api/cat.recovery.js index 7a75f6433..99ab18507 100644 --- a/api/api/cat.recovery.js +++ b/api/api/cat.recovery.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.repositories.js b/api/api/cat.repositories.js index f00592fcf..3998cc7ec 100644 --- a/api/api/cat.repositories.js +++ b/api/api/cat.repositories.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.segments.js b/api/api/cat.segments.js index 89d2b5672..b758eb502 100644 --- a/api/api/cat.segments.js +++ b/api/api/cat.segments.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.shards.js b/api/api/cat.shards.js index 634d78cd0..be4c2b87c 100644 --- a/api/api/cat.shards.js +++ b/api/api/cat.shards.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.snapshots.js b/api/api/cat.snapshots.js index 78d8921b9..03ef0f5f0 100644 --- a/api/api/cat.snapshots.js +++ b/api/api/cat.snapshots.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.tasks.js b/api/api/cat.tasks.js index 1e0eda879..eee249153 100644 --- a/api/api/cat.tasks.js +++ b/api/api/cat.tasks.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.templates.js b/api/api/cat.templates.js index adfc17124..581ebc411 100644 --- a/api/api/cat.templates.js +++ b/api/api/cat.templates.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.thread_pool.js b/api/api/cat.thread_pool.js index 63140220b..9016ee1ff 100644 --- a/api/api/cat.thread_pool.js +++ b/api/api/cat.thread_pool.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cat.transforms.js b/api/api/cat.transforms.js index 446b4c953..20bfd88d5 100644 --- a/api/api/cat.transforms.js +++ b/api/api/cat.transforms.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ccr.delete_auto_follow_pattern.js b/api/api/ccr.delete_auto_follow_pattern.js index df97e2bbb..76f433b03 100644 --- a/api/api/ccr.delete_auto_follow_pattern.js +++ b/api/api/ccr.delete_auto_follow_pattern.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildCcrDeleteAutoFollowPattern (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/ccr.follow.js b/api/api/ccr.follow.js index a193fe80c..7d957c691 100644 --- a/api/api/ccr.follow.js +++ b/api/api/ccr.follow.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildCcrFollow (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ccr.follow_info.js b/api/api/ccr.follow_info.js index d0c0c329a..e710b29d8 100644 --- a/api/api/ccr.follow_info.js +++ b/api/api/ccr.follow_info.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildCcrFollowInfo (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ccr.follow_stats.js b/api/api/ccr.follow_stats.js index 1a66b8645..c02e6a576 100644 --- a/api/api/ccr.follow_stats.js +++ b/api/api/ccr.follow_stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildCcrFollowStats (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ccr.forget_follower.js b/api/api/ccr.forget_follower.js index b340ef9d2..aa5a9a7ef 100644 --- a/api/api/ccr.forget_follower.js +++ b/api/api/ccr.forget_follower.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildCcrForgetFollower (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ccr.get_auto_follow_pattern.js b/api/api/ccr.get_auto_follow_pattern.js index fbc05aaba..b8e5ff65b 100644 --- a/api/api/ccr.get_auto_follow_pattern.js +++ b/api/api/ccr.get_auto_follow_pattern.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ccr.pause_auto_follow_pattern.js b/api/api/ccr.pause_auto_follow_pattern.js index 1d3f2dbad..c7f61bb23 100644 --- a/api/api/ccr.pause_auto_follow_pattern.js +++ b/api/api/ccr.pause_auto_follow_pattern.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildCcrPauseAutoFollowPattern (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/ccr.pause_follow.js b/api/api/ccr.pause_follow.js index 9756389e9..2a490ba05 100644 --- a/api/api/ccr.pause_follow.js +++ b/api/api/ccr.pause_follow.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildCcrPauseFollow (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ccr.put_auto_follow_pattern.js b/api/api/ccr.put_auto_follow_pattern.js index 55e2bde6e..561e9f086 100644 --- a/api/api/ccr.put_auto_follow_pattern.js +++ b/api/api/ccr.put_auto_follow_pattern.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildCcrPutAutoFollowPattern (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ccr.resume_auto_follow_pattern.js b/api/api/ccr.resume_auto_follow_pattern.js index d2139af1e..e8b23a3a9 100644 --- a/api/api/ccr.resume_auto_follow_pattern.js +++ b/api/api/ccr.resume_auto_follow_pattern.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildCcrResumeAutoFollowPattern (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/ccr.resume_follow.js b/api/api/ccr.resume_follow.js index 164bdd453..1360af9c3 100644 --- a/api/api/ccr.resume_follow.js +++ b/api/api/ccr.resume_follow.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildCcrResumeFollow (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ccr.stats.js b/api/api/ccr.stats.js index fc067a5cb..efc9520cc 100644 --- a/api/api/ccr.stats.js +++ b/api/api/ccr.stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ccr.unfollow.js b/api/api/ccr.unfollow.js index 629d73352..36dea601e 100644 --- a/api/api/ccr.unfollow.js +++ b/api/api/ccr.unfollow.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildCcrUnfollow (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/clear_scroll.js b/api/api/clear_scroll.js index ba3fef02f..285b0a646 100644 --- a/api/api/clear_scroll.js +++ b/api/api/clear_scroll.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.allocation_explain.js b/api/api/cluster.allocation_explain.js index c17b40213..d0d4b2fe5 100644 --- a/api/api/cluster.allocation_explain.js +++ b/api/api/cluster.allocation_explain.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.delete_component_template.js b/api/api/cluster.delete_component_template.js index d47afdd27..1c9c5dbfa 100644 --- a/api/api/cluster.delete_component_template.js +++ b/api/api/cluster.delete_component_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildClusterDeleteComponentTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/cluster.delete_voting_config_exclusions.js b/api/api/cluster.delete_voting_config_exclusions.js index fce5bfd28..6ff5cdbd7 100644 --- a/api/api/cluster.delete_voting_config_exclusions.js +++ b/api/api/cluster.delete_voting_config_exclusions.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.exists_component_template.js b/api/api/cluster.exists_component_template.js index cfdb42494..b11743513 100644 --- a/api/api/cluster.exists_component_template.js +++ b/api/api/cluster.exists_component_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildClusterExistsComponentTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/cluster.get_component_template.js b/api/api/cluster.get_component_template.js index 8a6d3030f..038b64830 100644 --- a/api/api/cluster.get_component_template.js +++ b/api/api/cluster.get_component_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.get_settings.js b/api/api/cluster.get_settings.js index 3ba0d4d9f..a523606a4 100644 --- a/api/api/cluster.get_settings.js +++ b/api/api/cluster.get_settings.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.health.js b/api/api/cluster.health.js index 077dd1a89..901b5823c 100644 --- a/api/api/cluster.health.js +++ b/api/api/cluster.health.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.pending_tasks.js b/api/api/cluster.pending_tasks.js index bde8cd9d8..0fb4115d1 100644 --- a/api/api/cluster.pending_tasks.js +++ b/api/api/cluster.pending_tasks.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.post_voting_config_exclusions.js b/api/api/cluster.post_voting_config_exclusions.js index 14cd90379..75561c180 100644 --- a/api/api/cluster.post_voting_config_exclusions.js +++ b/api/api/cluster.post_voting_config_exclusions.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.put_component_template.js b/api/api/cluster.put_component_template.js index 6dbcacf9f..bd087daad 100644 --- a/api/api/cluster.put_component_template.js +++ b/api/api/cluster.put_component_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,11 +61,11 @@ function buildClusterPutComponentTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/cluster.put_settings.js b/api/api/cluster.put_settings.js index d49a6261a..d1c688163 100644 --- a/api/api/cluster.put_settings.js +++ b/api/api/cluster.put_settings.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -47,7 +62,7 @@ function buildClusterPutSettings (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/cluster.remote_info.js b/api/api/cluster.remote_info.js index a18e6d6dc..8432efbcf 100644 --- a/api/api/cluster.remote_info.js +++ b/api/api/cluster.remote_info.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.reroute.js b/api/api/cluster.reroute.js index 6b00af451..47072fffb 100644 --- a/api/api/cluster.reroute.js +++ b/api/api/cluster.reroute.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/cluster.state.js b/api/api/cluster.state.js index bc54b2a0e..f3380ae4d 100644 --- a/api/api/cluster.state.js +++ b/api/api/cluster.state.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -57,7 +72,7 @@ function buildClusterState (opts) { } // check required url components - if (params['index'] != null && (params['metric'] == null)) { + if (params.index != null && (params.metric == null)) { const err = new ConfigurationError('Missing required parameter of the url: metric') return handleError(err, callback) } diff --git a/api/api/cluster.stats.js b/api/api/cluster.stats.js index be39dc291..74106d85d 100644 --- a/api/api/cluster.stats.js +++ b/api/api/cluster.stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/count.js b/api/api/count.js index e8e733aa8..045eb1dbc 100644 --- a/api/api/count.js +++ b/api/api/count.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -64,7 +79,7 @@ function buildCount (opts) { } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/create.js b/api/api/create.js index d9bedb3d9..d565b2963 100644 --- a/api/api/create.js +++ b/api/api/create.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -53,15 +68,15 @@ Returns a 409 response when a document with a same ID already exists in the inde } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/dangling_indices.delete_dangling_index.js b/api/api/dangling_indices.delete_dangling_index.js index 5b9b6dbc3..013a695f8 100644 --- a/api/api/dangling_indices.delete_dangling_index.js +++ b/api/api/dangling_indices.delete_dangling_index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -47,7 +62,7 @@ function buildDanglingIndicesDeleteDanglingIndex (opts) { } // check required parameters - if (params['index_uuid'] == null && params['indexUuid'] == null) { + if (params.index_uuid == null && params.indexUuid == null) { const err = new ConfigurationError('Missing required parameter: index_uuid or indexUuid') return handleError(err, callback) } diff --git a/api/api/dangling_indices.import_dangling_index.js b/api/api/dangling_indices.import_dangling_index.js index 69a6e4b46..f84a714be 100644 --- a/api/api/dangling_indices.import_dangling_index.js +++ b/api/api/dangling_indices.import_dangling_index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -47,7 +62,7 @@ function buildDanglingIndicesImportDanglingIndex (opts) { } // check required parameters - if (params['index_uuid'] == null && params['indexUuid'] == null) { + if (params.index_uuid == null && params.indexUuid == null) { const err = new ConfigurationError('Missing required parameter: index_uuid or indexUuid') return handleError(err, callback) } diff --git a/api/api/dangling_indices.list_dangling_indices.js b/api/api/dangling_indices.list_dangling_indices.js index fdc3847af..c26b3628f 100644 --- a/api/api/dangling_indices.list_dangling_indices.js +++ b/api/api/dangling_indices.list_dangling_indices.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/delete.js b/api/api/delete.js index 146ec5d63..72dd35909 100644 --- a/api/api/delete.js +++ b/api/api/delete.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -54,11 +69,11 @@ function buildDelete (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js index 8573f14b6..d13d3b4df 100644 --- a/api/api/delete_by_query.js +++ b/api/api/delete_by_query.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -91,17 +106,17 @@ function buildDeleteByQuery (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/delete_by_query_rethrottle.js b/api/api/delete_by_query_rethrottle.js index 066823a68..9932d3ba2 100644 --- a/api/api/delete_by_query_rethrottle.js +++ b/api/api/delete_by_query_rethrottle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -44,11 +59,11 @@ function buildDeleteByQueryRethrottle (opts) { } // check required parameters - if (params['task_id'] == null && params['taskId'] == null) { + if (params.task_id == null && params.taskId == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond') return handleError(err, callback) } diff --git a/api/api/delete_script.js b/api/api/delete_script.js index edf6ed203..f1b295074 100644 --- a/api/api/delete_script.js +++ b/api/api/delete_script.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildDeleteScript (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/enrich.delete_policy.js b/api/api/enrich.delete_policy.js index 790e0aec4..ff39119ac 100644 --- a/api/api/enrich.delete_policy.js +++ b/api/api/enrich.delete_policy.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildEnrichDeletePolicy (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/enrich.execute_policy.js b/api/api/enrich.execute_policy.js index 76dc6555b..0aabbe306 100644 --- a/api/api/enrich.execute_policy.js +++ b/api/api/enrich.execute_policy.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildEnrichExecutePolicy (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/enrich.get_policy.js b/api/api/enrich.get_policy.js index 66dc936c3..345957bf6 100644 --- a/api/api/enrich.get_policy.js +++ b/api/api/enrich.get_policy.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/enrich.put_policy.js b/api/api/enrich.put_policy.js index 8e5ce4423..1af03fde8 100644 --- a/api/api/enrich.put_policy.js +++ b/api/api/enrich.put_policy.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildEnrichPutPolicy (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/enrich.stats.js b/api/api/enrich.stats.js index eef1acb3a..77f43ca43 100644 --- a/api/api/enrich.stats.js +++ b/api/api/enrich.stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/eql.delete.js b/api/api/eql.delete.js index 33efe0512..af5b073f1 100644 --- a/api/api/eql.delete.js +++ b/api/api/eql.delete.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildEqlDelete (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/eql.get.js b/api/api/eql.get.js index 05fe84d1a..2bf3b6789 100644 --- a/api/api/eql.get.js +++ b/api/api/eql.get.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,7 +54,7 @@ function buildEqlGet (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/eql.search.js b/api/api/eql.search.js index eaa611d8a..813bd7b67 100644 --- a/api/api/eql.search.js +++ b/api/api/eql.search.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -41,11 +56,11 @@ function buildEqlSearch (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/exists.js b/api/api/exists.js index 7659a0907..81a1657e8 100644 --- a/api/api/exists.js +++ b/api/api/exists.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -56,11 +71,11 @@ function buildExists (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/exists_source.js b/api/api/exists_source.js index 059ed1de5..1469187ad 100644 --- a/api/api/exists_source.js +++ b/api/api/exists_source.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -54,20 +69,20 @@ function buildExistsSource (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/explain.js b/api/api/explain.js index cf513bdcb..023faa86f 100644 --- a/api/api/explain.js +++ b/api/api/explain.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -59,11 +74,11 @@ function buildExplain (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/field_caps.js b/api/api/field_caps.js index 94e2f601b..53bc6b673 100644 --- a/api/api/field_caps.js +++ b/api/api/field_caps.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/get.js b/api/api/get.js index ee5aeeee7..41c53993d 100644 --- a/api/api/get.js +++ b/api/api/get.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -56,11 +71,11 @@ function buildGet (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/get_script.js b/api/api/get_script.js index 0531b98a2..ab8f6cfe9 100644 --- a/api/api/get_script.js +++ b/api/api/get_script.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -44,7 +59,7 @@ function buildGetScript (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/get_script_context.js b/api/api/get_script_context.js index 1edc10047..c2a9df2f4 100644 --- a/api/api/get_script_context.js +++ b/api/api/get_script_context.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/get_script_languages.js b/api/api/get_script_languages.js index 38f70452b..f734d358f 100644 --- a/api/api/get_script_languages.js +++ b/api/api/get_script_languages.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/get_source.js b/api/api/get_source.js index 08543b96a..3e6da777a 100644 --- a/api/api/get_source.js +++ b/api/api/get_source.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -54,11 +69,11 @@ function buildGetSource (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/graph.explore.js b/api/api/graph.explore.js index af164898e..b6c36fe75 100644 --- a/api/api/graph.explore.js +++ b/api/api/graph.explore.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -38,13 +53,13 @@ function buildGraphExplore (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/ilm.delete_lifecycle.js b/api/api/ilm.delete_lifecycle.js index 798cf7871..c36edaacb 100644 --- a/api/api/ilm.delete_lifecycle.js +++ b/api/api/ilm.delete_lifecycle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildIlmDeleteLifecycle (opts) { } // check required parameters - if (params['policy'] == null) { + if (params.policy == null) { const err = new ConfigurationError('Missing required parameter: policy') return handleError(err, callback) } diff --git a/api/api/ilm.explain_lifecycle.js b/api/api/ilm.explain_lifecycle.js index d2e85be72..0e7451db1 100644 --- a/api/api/ilm.explain_lifecycle.js +++ b/api/api/ilm.explain_lifecycle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,7 +54,7 @@ function buildIlmExplainLifecycle (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ilm.get_lifecycle.js b/api/api/ilm.get_lifecycle.js index bd82e7423..85e124264 100644 --- a/api/api/ilm.get_lifecycle.js +++ b/api/api/ilm.get_lifecycle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ilm.get_status.js b/api/api/ilm.get_status.js index 13a26bfd8..fdc33cebd 100644 --- a/api/api/ilm.get_status.js +++ b/api/api/ilm.get_status.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ilm.move_to_step.js b/api/api/ilm.move_to_step.js index 5ce32fcd9..e0871af7c 100644 --- a/api/api/ilm.move_to_step.js +++ b/api/api/ilm.move_to_step.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildIlmMoveToStep (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ilm.put_lifecycle.js b/api/api/ilm.put_lifecycle.js index 301484462..38f238188 100644 --- a/api/api/ilm.put_lifecycle.js +++ b/api/api/ilm.put_lifecycle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildIlmPutLifecycle (opts) { } // check required parameters - if (params['policy'] == null) { + if (params.policy == null) { const err = new ConfigurationError('Missing required parameter: policy') return handleError(err, callback) } diff --git a/api/api/ilm.remove_policy.js b/api/api/ilm.remove_policy.js index cf3d650af..18d75a3f0 100644 --- a/api/api/ilm.remove_policy.js +++ b/api/api/ilm.remove_policy.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildIlmRemovePolicy (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ilm.retry.js b/api/api/ilm.retry.js index 92c2441ff..691fb210c 100644 --- a/api/api/ilm.retry.js +++ b/api/api/ilm.retry.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildIlmRetry (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ilm.start.js b/api/api/ilm.start.js index 0cfa45824..4fec9bc97 100644 --- a/api/api/ilm.start.js +++ b/api/api/ilm.start.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ilm.stop.js b/api/api/ilm.stop.js index 1d28947e7..734725e8a 100644 --- a/api/api/ilm.stop.js +++ b/api/api/ilm.stop.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/index.js b/api/api/index.js index 32421bcd6..bf4e0a17b 100644 --- a/api/api/index.js +++ b/api/api/index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -59,11 +74,11 @@ function buildIndex (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.add_block.js b/api/api/indices.add_block.js index 51fae6185..734021cb6 100644 --- a/api/api/indices.add_block.js +++ b/api/api/indices.add_block.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -51,17 +66,17 @@ function buildIndicesAddBlock (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['block'] == null) { + if (params.block == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.analyze.js b/api/api/indices.analyze.js index 609c29b4c..63e0a71ed 100644 --- a/api/api/indices.analyze.js +++ b/api/api/indices.analyze.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.clear_cache.js b/api/api/indices.clear_cache.js index 634b51cd9..e43b81303 100644 --- a/api/api/indices.clear_cache.js +++ b/api/api/indices.clear_cache.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.clone.js b/api/api/indices.clone.js index e9539bc9d..c57b42951 100644 --- a/api/api/indices.clone.js +++ b/api/api/indices.clone.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -47,17 +62,17 @@ function buildIndicesClone (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['target'] == null) { + if (params.target == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.close.js b/api/api/indices.close.js index d44ed86b5..dc9f45a7c 100644 --- a/api/api/indices.close.js +++ b/api/api/indices.close.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -53,7 +68,7 @@ function buildIndicesClose (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.create.js b/api/api/indices.create.js index 67f9ba580..9ecc7f8e0 100644 --- a/api/api/indices.create.js +++ b/api/api/indices.create.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -49,7 +64,7 @@ function buildIndicesCreate (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.create_data_stream.js b/api/api/indices.create_data_stream.js index 017720d9f..98ff056a2 100644 --- a/api/api/indices.create_data_stream.js +++ b/api/api/indices.create_data_stream.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -42,7 +57,7 @@ function buildIndicesCreateDataStream (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.data_streams_stats.js b/api/api/indices.data_streams_stats.js index 53abb7fc7..5fbc7c20e 100644 --- a/api/api/indices.data_streams_stats.js +++ b/api/api/indices.data_streams_stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.delete.js b/api/api/indices.delete.js index e10b4b41e..731529cf1 100644 --- a/api/api/indices.delete.js +++ b/api/api/indices.delete.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -51,7 +66,7 @@ function buildIndicesDelete (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.delete_alias.js b/api/api/indices.delete_alias.js index 7f5da226b..df6565a92 100644 --- a/api/api/indices.delete_alias.js +++ b/api/api/indices.delete_alias.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,17 +60,17 @@ function buildIndicesDeleteAlias (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.delete_data_stream.js b/api/api/indices.delete_data_stream.js index 10e5d6fe1..410e0fed8 100644 --- a/api/api/indices.delete_data_stream.js +++ b/api/api/indices.delete_data_stream.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -42,7 +57,7 @@ function buildIndicesDeleteDataStream (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.delete_index_template.js b/api/api/indices.delete_index_template.js index 94ca1beb0..8ca1b846d 100644 --- a/api/api/indices.delete_index_template.js +++ b/api/api/indices.delete_index_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildIndicesDeleteIndexTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.delete_template.js b/api/api/indices.delete_template.js index d4900659a..014fa02e0 100644 --- a/api/api/indices.delete_template.js +++ b/api/api/indices.delete_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildIndicesDeleteTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.exists.js b/api/api/indices.exists.js index aadaca04c..71b0260e4 100644 --- a/api/api/indices.exists.js +++ b/api/api/indices.exists.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -53,7 +68,7 @@ function buildIndicesExists (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.exists_alias.js b/api/api/indices.exists_alias.js index 06ad61598..49f6bc50b 100644 --- a/api/api/indices.exists_alias.js +++ b/api/api/indices.exists_alias.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -49,7 +64,7 @@ function buildIndicesExistsAlias (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.exists_index_template.js b/api/api/indices.exists_index_template.js index 5bb126810..0d6d541f0 100644 --- a/api/api/indices.exists_index_template.js +++ b/api/api/indices.exists_index_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -47,7 +62,7 @@ function buildIndicesExistsIndexTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.exists_template.js b/api/api/indices.exists_template.js index b1baa6ad1..04c44e40d 100644 --- a/api/api/indices.exists_template.js +++ b/api/api/indices.exists_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -47,7 +62,7 @@ function buildIndicesExistsTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.exists_type.js b/api/api/indices.exists_type.js index d19c3d688..f6461de62 100644 --- a/api/api/indices.exists_type.js +++ b/api/api/indices.exists_type.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -49,17 +64,17 @@ function buildIndicesExistsType (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['type'] == null) { + if (params.type == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.flush.js b/api/api/indices.flush.js index 4349c8e65..dc8ff30d3 100644 --- a/api/api/indices.flush.js +++ b/api/api/indices.flush.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.flush_synced.js b/api/api/indices.flush_synced.js index d3527e8c5..c92e4a483 100644 --- a/api/api/indices.flush_synced.js +++ b/api/api/indices.flush_synced.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.forcemerge.js b/api/api/indices.forcemerge.js index b3e2c3d1d..d45820017 100644 --- a/api/api/indices.forcemerge.js +++ b/api/api/indices.forcemerge.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.freeze.js b/api/api/indices.freeze.js index 033335bc3..610013cae 100644 --- a/api/api/indices.freeze.js +++ b/api/api/indices.freeze.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,7 +61,7 @@ function buildIndicesFreeze (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.get.js b/api/api/indices.get.js index ce5c9d4e3..b9700c260 100644 --- a/api/api/indices.get.js +++ b/api/api/indices.get.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -57,7 +72,7 @@ function buildIndicesGet (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.get_alias.js b/api/api/indices.get_alias.js index 4cbdb2fff..e0ac9495c 100644 --- a/api/api/indices.get_alias.js +++ b/api/api/indices.get_alias.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.get_data_stream.js b/api/api/indices.get_data_stream.js index 002024fc9..41e9d9d2b 100644 --- a/api/api/indices.get_data_stream.js +++ b/api/api/indices.get_data_stream.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.get_field_mapping.js b/api/api/indices.get_field_mapping.js index 0ebae652b..90c2e0d11 100644 --- a/api/api/indices.get_field_mapping.js +++ b/api/api/indices.get_field_mapping.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -53,7 +68,7 @@ function buildIndicesGetFieldMapping (opts) { } // check required parameters - if (params['fields'] == null) { + if (params.fields == null) { const err = new ConfigurationError('Missing required parameter: fields') return handleError(err, callback) } diff --git a/api/api/indices.get_index_template.js b/api/api/indices.get_index_template.js index 5464faef2..a315ec3b9 100644 --- a/api/api/indices.get_index_template.js +++ b/api/api/indices.get_index_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.get_mapping.js b/api/api/indices.get_mapping.js index 21e1125ce..746b000cb 100644 --- a/api/api/indices.get_mapping.js +++ b/api/api/indices.get_mapping.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.get_settings.js b/api/api/indices.get_settings.js index c4e60fef4..e63433c66 100644 --- a/api/api/indices.get_settings.js +++ b/api/api/indices.get_settings.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.get_template.js b/api/api/indices.get_template.js index 1586f546e..a6977181c 100644 --- a/api/api/indices.get_template.js +++ b/api/api/indices.get_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.get_upgrade.js b/api/api/indices.get_upgrade.js index b4a028ceb..2615c86b6 100644 --- a/api/api/indices.get_upgrade.js +++ b/api/api/indices.get_upgrade.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.open.js b/api/api/indices.open.js index 1fa3455eb..2137289ec 100644 --- a/api/api/indices.open.js +++ b/api/api/indices.open.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -53,7 +68,7 @@ function buildIndicesOpen (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.put_alias.js b/api/api/indices.put_alias.js index 4e72de0d6..9e8e38315 100644 --- a/api/api/indices.put_alias.js +++ b/api/api/indices.put_alias.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,17 +60,17 @@ function buildIndicesPutAlias (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.put_index_template.js b/api/api/indices.put_index_template.js index 3d088a83e..1f1e5af16 100644 --- a/api/api/indices.put_index_template.js +++ b/api/api/indices.put_index_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,11 +61,11 @@ function buildIndicesPutIndexTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.put_mapping.js b/api/api/indices.put_mapping.js index 3fdef01e4..7816bb53a 100644 --- a/api/api/indices.put_mapping.js +++ b/api/api/indices.put_mapping.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -55,7 +70,7 @@ function buildIndicesPutMapping (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.put_settings.js b/api/api/indices.put_settings.js index f2f67e2a4..7615a6c79 100644 --- a/api/api/indices.put_settings.js +++ b/api/api/indices.put_settings.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -55,7 +70,7 @@ function buildIndicesPutSettings (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.put_template.js b/api/api/indices.put_template.js index 848d74056..6e6cfad35 100644 --- a/api/api/indices.put_template.js +++ b/api/api/indices.put_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -48,11 +63,11 @@ function buildIndicesPutTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.recovery.js b/api/api/indices.recovery.js index e29dc818d..5637add83 100644 --- a/api/api/indices.recovery.js +++ b/api/api/indices.recovery.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.refresh.js b/api/api/indices.refresh.js index 40a92c754..6328152ac 100644 --- a/api/api/indices.refresh.js +++ b/api/api/indices.refresh.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.reload_search_analyzers.js b/api/api/indices.reload_search_analyzers.js index f0284d279..ad0616195 100644 --- a/api/api/indices.reload_search_analyzers.js +++ b/api/api/indices.reload_search_analyzers.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -41,7 +56,7 @@ function buildIndicesReloadSearchAnalyzers (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.resolve_index.js b/api/api/indices.resolve_index.js index 12cfedab6..a0e8222f9 100644 --- a/api/api/indices.resolve_index.js +++ b/api/api/indices.resolve_index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -44,7 +59,7 @@ function buildIndicesResolveIndex (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.rollover.js b/api/api/indices.rollover.js index 58f26caec..6d208b669 100644 --- a/api/api/indices.rollover.js +++ b/api/api/indices.rollover.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -52,13 +67,13 @@ is considered to be too large or too old. } // check required parameters - if (params['alias'] == null) { + if (params.alias == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: alias') return handleError(err, callback) } diff --git a/api/api/indices.segments.js b/api/api/indices.segments.js index d02c4b593..70d384094 100644 --- a/api/api/indices.segments.js +++ b/api/api/indices.segments.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.shard_stores.js b/api/api/indices.shard_stores.js index 62e4fc64b..1882739a6 100644 --- a/api/api/indices.shard_stores.js +++ b/api/api/indices.shard_stores.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.shrink.js b/api/api/indices.shrink.js index 14bacab04..08133f735 100644 --- a/api/api/indices.shrink.js +++ b/api/api/indices.shrink.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -49,17 +64,17 @@ function buildIndicesShrink (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['target'] == null) { + if (params.target == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.simulate_index_template.js b/api/api/indices.simulate_index_template.js index 791806076..e5e525547 100644 --- a/api/api/indices.simulate_index_template.js +++ b/api/api/indices.simulate_index_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,7 +61,7 @@ function buildIndicesSimulateIndexTemplate (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.simulate_template.js b/api/api/indices.simulate_template.js index 94c22fd2e..d3b2d81e2 100644 --- a/api/api/indices.simulate_template.js +++ b/api/api/indices.simulate_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.split.js b/api/api/indices.split.js index 7da0053d0..000f4d066 100644 --- a/api/api/indices.split.js +++ b/api/api/indices.split.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -49,17 +64,17 @@ function buildIndicesSplit (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['target'] == null) { + if (params.target == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.stats.js b/api/api/indices.stats.js index 787ede172..746a5f0ec 100644 --- a/api/api/indices.stats.js +++ b/api/api/indices.stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.unfreeze.js b/api/api/indices.unfreeze.js index 00a31a84d..2a04c39aa 100644 --- a/api/api/indices.unfreeze.js +++ b/api/api/indices.unfreeze.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,7 +61,7 @@ function buildIndicesUnfreeze (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.update_aliases.js b/api/api/indices.update_aliases.js index 4633aaa94..70d70bc95 100644 --- a/api/api/indices.update_aliases.js +++ b/api/api/indices.update_aliases.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildIndicesUpdateAliases (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.upgrade.js b/api/api/indices.upgrade.js index b11d060a8..9501e0cfa 100644 --- a/api/api/indices.upgrade.js +++ b/api/api/indices.upgrade.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/indices.validate_query.js b/api/api/indices.validate_query.js index 385685b95..4b6c8f428 100644 --- a/api/api/indices.validate_query.js +++ b/api/api/indices.validate_query.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -60,7 +75,7 @@ function buildIndicesValidateQuery (opts) { } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/info.js b/api/api/info.js index b0d0201f2..97ad8e67a 100644 --- a/api/api/info.js +++ b/api/api/info.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ingest.delete_pipeline.js b/api/api/ingest.delete_pipeline.js index fffff5a5d..18c83337c 100644 --- a/api/api/ingest.delete_pipeline.js +++ b/api/api/ingest.delete_pipeline.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildIngestDeletePipeline (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/ingest.get_pipeline.js b/api/api/ingest.get_pipeline.js index 5008d0d9a..2d14b9c61 100644 --- a/api/api/ingest.get_pipeline.js +++ b/api/api/ingest.get_pipeline.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ingest.processor_grok.js b/api/api/ingest.processor_grok.js index 8a1c2c883..5939f6920 100644 --- a/api/api/ingest.processor_grok.js +++ b/api/api/ingest.processor_grok.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ingest.put_pipeline.js b/api/api/ingest.put_pipeline.js index f57a932c9..1e6504b52 100644 --- a/api/api/ingest.put_pipeline.js +++ b/api/api/ingest.put_pipeline.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,11 +60,11 @@ function buildIngestPutPipeline (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ingest.simulate.js b/api/api/ingest.simulate.js index 30dac263c..5ed060c46 100644 --- a/api/api/ingest.simulate.js +++ b/api/api/ingest.simulate.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -43,7 +58,7 @@ function buildIngestSimulate (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/license.delete.js b/api/api/license.delete.js index c099da457..512ec6493 100644 --- a/api/api/license.delete.js +++ b/api/api/license.delete.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/license.get.js b/api/api/license.get.js index 75ef90a54..e3211de88 100644 --- a/api/api/license.get.js +++ b/api/api/license.get.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/license.get_basic_status.js b/api/api/license.get_basic_status.js index 2d8fdde52..102749294 100644 --- a/api/api/license.get_basic_status.js +++ b/api/api/license.get_basic_status.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/license.get_trial_status.js b/api/api/license.get_trial_status.js index e7b16218c..63ad25501 100644 --- a/api/api/license.get_trial_status.js +++ b/api/api/license.get_trial_status.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/license.post.js b/api/api/license.post.js index d4463f5a8..1589b397b 100644 --- a/api/api/license.post.js +++ b/api/api/license.post.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/license.post_start_basic.js b/api/api/license.post_start_basic.js index 7b9a1dec1..045d3d084 100644 --- a/api/api/license.post_start_basic.js +++ b/api/api/license.post_start_basic.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/license.post_start_trial.js b/api/api/license.post_start_trial.js index 08e876df2..03afd1b7d 100644 --- a/api/api/license.post_start_trial.js +++ b/api/api/license.post_start_trial.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/mget.js b/api/api/mget.js index 2e6093e5e..2292f9420 100644 --- a/api/api/mget.js +++ b/api/api/mget.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -53,13 +68,13 @@ function buildMget (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/migration.deprecations.js b/api/api/migration.deprecations.js index 1a0efca36..f3d95f5e1 100644 --- a/api/api/migration.deprecations.js +++ b/api/api/migration.deprecations.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.close_job.js b/api/api/ml.close_job.js index fb853a188..7ba123cb9 100644 --- a/api/api/ml.close_job.js +++ b/api/api/ml.close_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -40,7 +55,7 @@ function buildMlCloseJob (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.delete_calendar.js b/api/api/ml.delete_calendar.js index 7ce88dbac..6def5b1a8 100644 --- a/api/api/ml.delete_calendar.js +++ b/api/api/ml.delete_calendar.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlDeleteCalendar (opts) { } // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } diff --git a/api/api/ml.delete_calendar_event.js b/api/api/ml.delete_calendar_event.js index 027c8ebaf..9b42c9e56 100644 --- a/api/api/ml.delete_calendar_event.js +++ b/api/api/ml.delete_calendar_event.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,17 +52,17 @@ function buildMlDeleteCalendarEvent (opts) { } // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: calendar_id') return handleError(err, callback) } diff --git a/api/api/ml.delete_calendar_job.js b/api/api/ml.delete_calendar_job.js index cd9cee576..3d2220bbe 100644 --- a/api/api/ml.delete_calendar_job.js +++ b/api/api/ml.delete_calendar_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,17 +52,17 @@ function buildMlDeleteCalendarJob (opts) { } // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: calendar_id') return handleError(err, callback) } diff --git a/api/api/ml.delete_data_frame_analytics.js b/api/api/ml.delete_data_frame_analytics.js index 6b7143b59..fc95210c2 100644 --- a/api/api/ml.delete_data_frame_analytics.js +++ b/api/api/ml.delete_data_frame_analytics.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -38,7 +53,7 @@ function buildMlDeleteDataFrameAnalytics (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/ml.delete_datafeed.js b/api/api/ml.delete_datafeed.js index ecf9a4f92..bcdeab80c 100644 --- a/api/api/ml.delete_datafeed.js +++ b/api/api/ml.delete_datafeed.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlDeleteDatafeed (opts) { } // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } diff --git a/api/api/ml.delete_expired_data.js b/api/api/ml.delete_expired_data.js index 7300fd58d..eb33a8169 100644 --- a/api/api/ml.delete_expired_data.js +++ b/api/api/ml.delete_expired_data.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.delete_filter.js b/api/api/ml.delete_filter.js index 439346fcd..b5281917a 100644 --- a/api/api/ml.delete_filter.js +++ b/api/api/ml.delete_filter.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlDeleteFilter (opts) { } // check required parameters - if (params['filter_id'] == null && params['filterId'] == null) { + if (params.filter_id == null && params.filterId == null) { const err = new ConfigurationError('Missing required parameter: filter_id or filterId') return handleError(err, callback) } diff --git a/api/api/ml.delete_forecast.js b/api/api/ml.delete_forecast.js index 4f2e7f46f..41026d9ee 100644 --- a/api/api/ml.delete_forecast.js +++ b/api/api/ml.delete_forecast.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,13 +54,13 @@ function buildMlDeleteForecast (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.delete_job.js b/api/api/ml.delete_job.js index 31122255c..4204f8fc7 100644 --- a/api/api/ml.delete_job.js +++ b/api/api/ml.delete_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -38,7 +53,7 @@ function buildMlDeleteJob (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.delete_model_snapshot.js b/api/api/ml.delete_model_snapshot.js index 5768d1d6a..ce61ff928 100644 --- a/api/api/ml.delete_model_snapshot.js +++ b/api/api/ml.delete_model_snapshot.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,17 +52,17 @@ function buildMlDeleteModelSnapshot (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.delete_trained_model.js b/api/api/ml.delete_trained_model.js index 0aacc49ba..c4d0e0348 100644 --- a/api/api/ml.delete_trained_model.js +++ b/api/api/ml.delete_trained_model.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlDeleteTrainedModel (opts) { } // check required parameters - if (params['model_id'] == null && params['modelId'] == null) { + if (params.model_id == null && params.modelId == null) { const err = new ConfigurationError('Missing required parameter: model_id or modelId') return handleError(err, callback) } diff --git a/api/api/ml.estimate_model_memory.js b/api/api/ml.estimate_model_memory.js index 4287cfec6..5e7cebb29 100644 --- a/api/api/ml.estimate_model_memory.js +++ b/api/api/ml.estimate_model_memory.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlEstimateModelMemory (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.evaluate_data_frame.js b/api/api/ml.evaluate_data_frame.js index 24ca8e3d2..3dfdfb4af 100644 --- a/api/api/ml.evaluate_data_frame.js +++ b/api/api/ml.evaluate_data_frame.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlEvaluateDataFrame (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.explain_data_frame_analytics.js b/api/api/ml.explain_data_frame_analytics.js index dec8dcf79..91968aebb 100644 --- a/api/api/ml.explain_data_frame_analytics.js +++ b/api/api/ml.explain_data_frame_analytics.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.find_file_structure.js b/api/api/ml.find_file_structure.js index e8002c15d..bfd6efe55 100644 --- a/api/api/ml.find_file_structure.js +++ b/api/api/ml.find_file_structure.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -58,7 +73,7 @@ function buildMlFindFileStructure (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.flush_job.js b/api/api/ml.flush_job.js index 4ca50f6bd..68562d94a 100644 --- a/api/api/ml.flush_job.js +++ b/api/api/ml.flush_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -43,7 +58,7 @@ function buildMlFlushJob (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.forecast.js b/api/api/ml.forecast.js index b1af60455..7eb241c5a 100644 --- a/api/api/ml.forecast.js +++ b/api/api/ml.forecast.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -40,7 +55,7 @@ function buildMlForecast (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.get_buckets.js b/api/api/ml.get_buckets.js index 3e7585a5f..f53a1020d 100644 --- a/api/api/ml.get_buckets.js +++ b/api/api/ml.get_buckets.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -47,13 +62,13 @@ function buildMlGetBuckets (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.get_calendar_events.js b/api/api/ml.get_calendar_events.js index 6bb299b77..80f362391 100644 --- a/api/api/ml.get_calendar_events.js +++ b/api/api/ml.get_calendar_events.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -42,7 +57,7 @@ function buildMlGetCalendarEvents (opts) { } // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } diff --git a/api/api/ml.get_calendars.js b/api/api/ml.get_calendars.js index 53440e052..6d21ec955 100644 --- a/api/api/ml.get_calendars.js +++ b/api/api/ml.get_calendars.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.get_categories.js b/api/api/ml.get_categories.js index 465629a73..1f13b2617 100644 --- a/api/api/ml.get_categories.js +++ b/api/api/ml.get_categories.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,13 +54,13 @@ function buildMlGetCategories (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.get_data_frame_analytics.js b/api/api/ml.get_data_frame_analytics.js index 0d3d99008..f5af1325f 100644 --- a/api/api/ml.get_data_frame_analytics.js +++ b/api/api/ml.get_data_frame_analytics.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.get_data_frame_analytics_stats.js b/api/api/ml.get_data_frame_analytics_stats.js index 73e224828..172fd3a09 100644 --- a/api/api/ml.get_data_frame_analytics_stats.js +++ b/api/api/ml.get_data_frame_analytics_stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.get_datafeed_stats.js b/api/api/ml.get_datafeed_stats.js index 9935f16f4..3de9c923f 100644 --- a/api/api/ml.get_datafeed_stats.js +++ b/api/api/ml.get_datafeed_stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.get_datafeeds.js b/api/api/ml.get_datafeeds.js index 66b0cde5c..e48032e46 100644 --- a/api/api/ml.get_datafeeds.js +++ b/api/api/ml.get_datafeeds.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.get_filters.js b/api/api/ml.get_filters.js index 0d5c36973..0c51f6a4c 100644 --- a/api/api/ml.get_filters.js +++ b/api/api/ml.get_filters.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.get_influencers.js b/api/api/ml.get_influencers.js index 91d8269bd..9cbef8aad 100644 --- a/api/api/ml.get_influencers.js +++ b/api/api/ml.get_influencers.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,7 +61,7 @@ function buildMlGetInfluencers (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.get_job_stats.js b/api/api/ml.get_job_stats.js index 6827cff93..f79137413 100644 --- a/api/api/ml.get_job_stats.js +++ b/api/api/ml.get_job_stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.get_jobs.js b/api/api/ml.get_jobs.js index 30c78f4e5..bf765da73 100644 --- a/api/api/ml.get_jobs.js +++ b/api/api/ml.get_jobs.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.get_model_snapshots.js b/api/api/ml.get_model_snapshots.js index 26e1e1574..92011b83e 100644 --- a/api/api/ml.get_model_snapshots.js +++ b/api/api/ml.get_model_snapshots.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -42,13 +57,13 @@ function buildMlGetModelSnapshots (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.get_overall_buckets.js b/api/api/ml.get_overall_buckets.js index a22f47ddf..093340b85 100644 --- a/api/api/ml.get_overall_buckets.js +++ b/api/api/ml.get_overall_buckets.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -47,7 +62,7 @@ function buildMlGetOverallBuckets (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.get_records.js b/api/api/ml.get_records.js index 6f160cb24..bd588ba47 100644 --- a/api/api/ml.get_records.js +++ b/api/api/ml.get_records.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,7 +61,7 @@ function buildMlGetRecords (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.get_trained_models.js b/api/api/ml.get_trained_models.js index b447802ed..68e94f6d5 100644 --- a/api/api/ml.get_trained_models.js +++ b/api/api/ml.get_trained_models.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.get_trained_models_stats.js b/api/api/ml.get_trained_models_stats.js index a06558cf9..b5769a5cb 100644 --- a/api/api/ml.get_trained_models_stats.js +++ b/api/api/ml.get_trained_models_stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.info.js b/api/api/ml.info.js index 67f1c5254..58b36f195 100644 --- a/api/api/ml.info.js +++ b/api/api/ml.info.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.open_job.js b/api/api/ml.open_job.js index fd7199a7e..e4a2063be 100644 --- a/api/api/ml.open_job.js +++ b/api/api/ml.open_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlOpenJob (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.post_calendar_events.js b/api/api/ml.post_calendar_events.js index 1586d6e88..7099d9e51 100644 --- a/api/api/ml.post_calendar_events.js +++ b/api/api/ml.post_calendar_events.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildMlPostCalendarEvents (opts) { } // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.post_data.js b/api/api/ml.post_data.js index ee13a736f..9ed7b7e0e 100644 --- a/api/api/ml.post_data.js +++ b/api/api/ml.post_data.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,11 +54,11 @@ function buildMlPostData (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.preview_datafeed.js b/api/api/ml.preview_datafeed.js index cd9807027..e01687c48 100644 --- a/api/api/ml.preview_datafeed.js +++ b/api/api/ml.preview_datafeed.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlPreviewDatafeed (opts) { } // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } diff --git a/api/api/ml.put_calendar.js b/api/api/ml.put_calendar.js index d81be26fe..da38e3900 100644 --- a/api/api/ml.put_calendar.js +++ b/api/api/ml.put_calendar.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlPutCalendar (opts) { } // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } diff --git a/api/api/ml.put_calendar_job.js b/api/api/ml.put_calendar_job.js index b6ff7a902..7a278e83a 100644 --- a/api/api/ml.put_calendar_job.js +++ b/api/api/ml.put_calendar_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,17 +52,17 @@ function buildMlPutCalendarJob (opts) { } // check required parameters - if (params['calendar_id'] == null && params['calendarId'] == null) { + if (params.calendar_id == null && params.calendarId == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: calendar_id') return handleError(err, callback) } diff --git a/api/api/ml.put_data_frame_analytics.js b/api/api/ml.put_data_frame_analytics.js index 4e01baa44..51e12f448 100644 --- a/api/api/ml.put_data_frame_analytics.js +++ b/api/api/ml.put_data_frame_analytics.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildMlPutDataFrameAnalytics (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.put_datafeed.js b/api/api/ml.put_datafeed.js index 7f87ea306..ce5c490d2 100644 --- a/api/api/ml.put_datafeed.js +++ b/api/api/ml.put_datafeed.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -43,11 +58,11 @@ function buildMlPutDatafeed (opts) { } // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.put_filter.js b/api/api/ml.put_filter.js index a82fffd70..51e856fdc 100644 --- a/api/api/ml.put_filter.js +++ b/api/api/ml.put_filter.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildMlPutFilter (opts) { } // check required parameters - if (params['filter_id'] == null && params['filterId'] == null) { + if (params.filter_id == null && params.filterId == null) { const err = new ConfigurationError('Missing required parameter: filter_id or filterId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.put_job.js b/api/api/ml.put_job.js index 0ad56a8aa..408565cd5 100644 --- a/api/api/ml.put_job.js +++ b/api/api/ml.put_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildMlPutJob (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.put_trained_model.js b/api/api/ml.put_trained_model.js index 1d460ae35..ddf9a40e6 100644 --- a/api/api/ml.put_trained_model.js +++ b/api/api/ml.put_trained_model.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildMlPutTrainedModel (opts) { } // check required parameters - if (params['model_id'] == null && params['modelId'] == null) { + if (params.model_id == null && params.modelId == null) { const err = new ConfigurationError('Missing required parameter: model_id or modelId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.revert_model_snapshot.js b/api/api/ml.revert_model_snapshot.js index b5ac7a714..2ed500095 100644 --- a/api/api/ml.revert_model_snapshot.js +++ b/api/api/ml.revert_model_snapshot.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,17 +52,17 @@ function buildMlRevertModelSnapshot (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.set_upgrade_mode.js b/api/api/ml.set_upgrade_mode.js index 6d5a03f06..1fe6038d5 100644 --- a/api/api/ml.set_upgrade_mode.js +++ b/api/api/ml.set_upgrade_mode.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ml.start_data_frame_analytics.js b/api/api/ml.start_data_frame_analytics.js index 7ba5210b3..b69e03bcd 100644 --- a/api/api/ml.start_data_frame_analytics.js +++ b/api/api/ml.start_data_frame_analytics.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlStartDataFrameAnalytics (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/ml.start_datafeed.js b/api/api/ml.start_datafeed.js index 45725dfbf..e0a7ca97c 100644 --- a/api/api/ml.start_datafeed.js +++ b/api/api/ml.start_datafeed.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,7 +54,7 @@ function buildMlStartDatafeed (opts) { } // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } diff --git a/api/api/ml.stop_data_frame_analytics.js b/api/api/ml.stop_data_frame_analytics.js index f549389e2..2a0f1f7c0 100644 --- a/api/api/ml.stop_data_frame_analytics.js +++ b/api/api/ml.stop_data_frame_analytics.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -40,7 +55,7 @@ function buildMlStopDataFrameAnalytics (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/ml.stop_datafeed.js b/api/api/ml.stop_datafeed.js index a10f9a926..0f93c7c1e 100644 --- a/api/api/ml.stop_datafeed.js +++ b/api/api/ml.stop_datafeed.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -40,7 +55,7 @@ function buildMlStopDatafeed (opts) { } // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } diff --git a/api/api/ml.update_data_frame_analytics.js b/api/api/ml.update_data_frame_analytics.js index 1e1d21a12..cd94e0be0 100644 --- a/api/api/ml.update_data_frame_analytics.js +++ b/api/api/ml.update_data_frame_analytics.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildMlUpdateDataFrameAnalytics (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.update_datafeed.js b/api/api/ml.update_datafeed.js index 253b89cc7..fae02c90d 100644 --- a/api/api/ml.update_datafeed.js +++ b/api/api/ml.update_datafeed.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -43,11 +58,11 @@ function buildMlUpdateDatafeed (opts) { } // check required parameters - if (params['datafeed_id'] == null && params['datafeedId'] == null) { + if (params.datafeed_id == null && params.datafeedId == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.update_filter.js b/api/api/ml.update_filter.js index 38296576e..5074ca458 100644 --- a/api/api/ml.update_filter.js +++ b/api/api/ml.update_filter.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildMlUpdateFilter (opts) { } // check required parameters - if (params['filter_id'] == null && params['filterId'] == null) { + if (params.filter_id == null && params.filterId == null) { const err = new ConfigurationError('Missing required parameter: filter_id or filterId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.update_job.js b/api/api/ml.update_job.js index 3f2b52e88..efc9e6c36 100644 --- a/api/api/ml.update_job.js +++ b/api/api/ml.update_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildMlUpdateJob (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.update_model_snapshot.js b/api/api/ml.update_model_snapshot.js index 5890350a9..7ae5f03f8 100644 --- a/api/api/ml.update_model_snapshot.js +++ b/api/api/ml.update_model_snapshot.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,21 +52,21 @@ function buildMlUpdateModelSnapshot (opts) { } // check required parameters - if (params['job_id'] == null && params['jobId'] == null) { + if (params.job_id == null && params.jobId == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter: snapshot_id or snapshotId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.validate.js b/api/api/ml.validate.js index 6a20fc89b..992c74097 100644 --- a/api/api/ml.validate.js +++ b/api/api/ml.validate.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlValidate (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.validate_detector.js b/api/api/ml.validate_detector.js index 38549430e..09a6710ab 100644 --- a/api/api/ml.validate_detector.js +++ b/api/api/ml.validate_detector.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildMlValidateDetector (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/monitoring.bulk.js b/api/api/monitoring.bulk.js index 366f72155..037f8043b 100644 --- a/api/api/monitoring.bulk.js +++ b/api/api/monitoring.bulk.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -41,7 +56,7 @@ function buildMonitoringBulk (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/msearch.js b/api/api/msearch.js index db80ef03b..fe4fd840b 100644 --- a/api/api/msearch.js +++ b/api/api/msearch.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -56,13 +71,13 @@ function buildMsearch (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/msearch_template.js b/api/api/msearch_template.js index 5bad34db8..545ab9645 100644 --- a/api/api/msearch_template.js +++ b/api/api/msearch_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -52,13 +67,13 @@ function buildMsearchTemplate (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/mtermvectors.js b/api/api/mtermvectors.js index c11e0537f..fc6e40dab 100644 --- a/api/api/mtermvectors.js +++ b/api/api/mtermvectors.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -57,7 +72,7 @@ function buildMtermvectors (opts) { } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/nodes.hot_threads.js b/api/api/nodes.hot_threads.js index 6e2a44d4b..0a2173c86 100644 --- a/api/api/nodes.hot_threads.js +++ b/api/api/nodes.hot_threads.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/nodes.info.js b/api/api/nodes.info.js index 372e37c3b..deac12082 100644 --- a/api/api/nodes.info.js +++ b/api/api/nodes.info.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/nodes.reload_secure_settings.js b/api/api/nodes.reload_secure_settings.js index dc82ea055..388beb720 100644 --- a/api/api/nodes.reload_secure_settings.js +++ b/api/api/nodes.reload_secure_settings.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/nodes.stats.js b/api/api/nodes.stats.js index 5a47a7e21..6c62da5ba 100644 --- a/api/api/nodes.stats.js +++ b/api/api/nodes.stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/nodes.usage.js b/api/api/nodes.usage.js index 0b317b371..bfa3f9d07 100644 --- a/api/api/nodes.usage.js +++ b/api/api/nodes.usage.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/ping.js b/api/api/ping.js index f37fa4103..2ec5843d3 100644 --- a/api/api/ping.js +++ b/api/api/ping.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/put_script.js b/api/api/put_script.js index 160114e11..4b41a4bc4 100644 --- a/api/api/put_script.js +++ b/api/api/put_script.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,17 +61,17 @@ function buildPutScript (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: id') return handleError(err, callback) } diff --git a/api/api/rank_eval.js b/api/api/rank_eval.js index 2debba204..b972bb9c1 100644 --- a/api/api/rank_eval.js +++ b/api/api/rank_eval.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -50,7 +65,7 @@ function buildRankEval (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/reindex.js b/api/api/reindex.js index 5712b2c56..91bc0c005 100644 --- a/api/api/reindex.js +++ b/api/api/reindex.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -56,7 +71,7 @@ documents from a remote cluster. } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/reindex_rethrottle.js b/api/api/reindex_rethrottle.js index 37fd8a031..35c19a1dc 100644 --- a/api/api/reindex_rethrottle.js +++ b/api/api/reindex_rethrottle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -44,11 +59,11 @@ function buildReindexRethrottle (opts) { } // check required parameters - if (params['task_id'] == null && params['taskId'] == null) { + if (params.task_id == null && params.taskId == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond') return handleError(err, callback) } diff --git a/api/api/render_search_template.js b/api/api/render_search_template.js index 3cdefa7cc..a0422a0ab 100644 --- a/api/api/render_search_template.js +++ b/api/api/render_search_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/rollup.delete_job.js b/api/api/rollup.delete_job.js index befeedff0..cd98ce06c 100644 --- a/api/api/rollup.delete_job.js +++ b/api/api/rollup.delete_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildRollupDeleteJob (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/rollup.get_jobs.js b/api/api/rollup.get_jobs.js index 57414ab06..ba0c13dc7 100644 --- a/api/api/rollup.get_jobs.js +++ b/api/api/rollup.get_jobs.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/rollup.get_rollup_caps.js b/api/api/rollup.get_rollup_caps.js index fd5a5fded..087ced128 100644 --- a/api/api/rollup.get_rollup_caps.js +++ b/api/api/rollup.get_rollup_caps.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/rollup.get_rollup_index_caps.js b/api/api/rollup.get_rollup_index_caps.js index 2f127cfc3..50fc73ce6 100644 --- a/api/api/rollup.get_rollup_index_caps.js +++ b/api/api/rollup.get_rollup_index_caps.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildRollupGetRollupIndexCaps (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/rollup.put_job.js b/api/api/rollup.put_job.js index ef68909fb..542c89278 100644 --- a/api/api/rollup.put_job.js +++ b/api/api/rollup.put_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildRollupPutJob (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/rollup.rollup_search.js b/api/api/rollup.rollup_search.js index 4bd756434..4681530be 100644 --- a/api/api/rollup.rollup_search.js +++ b/api/api/rollup.rollup_search.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,17 +54,17 @@ function buildRollupRollupSearch (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/rollup.start_job.js b/api/api/rollup.start_job.js index 5fad665ba..0aaacd745 100644 --- a/api/api/rollup.start_job.js +++ b/api/api/rollup.start_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildRollupStartJob (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/rollup.stop_job.js b/api/api/rollup.stop_job.js index 727058e2b..25cc98bbf 100644 --- a/api/api/rollup.stop_job.js +++ b/api/api/rollup.stop_job.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,7 +54,7 @@ function buildRollupStopJob (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/scripts_painless_execute.js b/api/api/scripts_painless_execute.js index 1bb435492..693d3a4eb 100644 --- a/api/api/scripts_painless_execute.js +++ b/api/api/scripts_painless_execute.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/scroll.js b/api/api/scroll.js index 47c10e30e..f2d66911a 100644 --- a/api/api/scroll.js +++ b/api/api/scroll.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/search.js b/api/api/search.js index c17ccd295..615471968 100644 --- a/api/api/search.js +++ b/api/api/search.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -111,7 +126,7 @@ function buildSearch (opts) { } // check required url components - if (params['type'] != null && (params['index'] == null)) { + if (params.type != null && (params.index == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/search_shards.js b/api/api/search_shards.js index 227ec04ba..4b2d46424 100644 --- a/api/api/search_shards.js +++ b/api/api/search_shards.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/search_template.js b/api/api/search_template.js index 73298e7a4..d525264da 100644 --- a/api/api/search_template.js +++ b/api/api/search_template.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -63,13 +78,13 @@ function buildSearchTemplate (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/searchable_snapshots.clear_cache.js b/api/api/searchable_snapshots.clear_cache.js index a581278fe..eca647ed9 100644 --- a/api/api/searchable_snapshots.clear_cache.js +++ b/api/api/searchable_snapshots.clear_cache.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/searchable_snapshots.mount.js b/api/api/searchable_snapshots.mount.js index 4724017aa..8219584c6 100644 --- a/api/api/searchable_snapshots.mount.js +++ b/api/api/searchable_snapshots.mount.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,21 +54,21 @@ function buildSearchableSnapshotsMount (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new ConfigurationError('Missing required parameter: snapshot') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/searchable_snapshots.repository_stats.js b/api/api/searchable_snapshots.repository_stats.js index 3042a6e4c..a4149608b 100644 --- a/api/api/searchable_snapshots.repository_stats.js +++ b/api/api/searchable_snapshots.repository_stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSearchableSnapshotsRepositoryStats (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } diff --git a/api/api/searchable_snapshots.stats.js b/api/api/searchable_snapshots.stats.js index 341d315d3..83ece8220 100644 --- a/api/api/searchable_snapshots.stats.js +++ b/api/api/searchable_snapshots.stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/security.authenticate.js b/api/api/security.authenticate.js index bd156f41f..adf3d0969 100644 --- a/api/api/security.authenticate.js +++ b/api/api/security.authenticate.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/security.change_password.js b/api/api/security.change_password.js index b71816c75..19a8afa2d 100644 --- a/api/api/security.change_password.js +++ b/api/api/security.change_password.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityChangePassword (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.clear_cached_privileges.js b/api/api/security.clear_cached_privileges.js index 35899d76b..19be21fbd 100644 --- a/api/api/security.clear_cached_privileges.js +++ b/api/api/security.clear_cached_privileges.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityClearCachedPrivileges (opts) { } // check required parameters - if (params['application'] == null) { + if (params.application == null) { const err = new ConfigurationError('Missing required parameter: application') return handleError(err, callback) } diff --git a/api/api/security.clear_cached_realms.js b/api/api/security.clear_cached_realms.js index d06e2aa24..81071429e 100644 --- a/api/api/security.clear_cached_realms.js +++ b/api/api/security.clear_cached_realms.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityClearCachedRealms (opts) { } // check required parameters - if (params['realms'] == null) { + if (params.realms == null) { const err = new ConfigurationError('Missing required parameter: realms') return handleError(err, callback) } diff --git a/api/api/security.clear_cached_roles.js b/api/api/security.clear_cached_roles.js index fb6497298..82d9c4563 100644 --- a/api/api/security.clear_cached_roles.js +++ b/api/api/security.clear_cached_roles.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityClearCachedRoles (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/security.create_api_key.js b/api/api/security.create_api_key.js index d0ec816da..742b613e4 100644 --- a/api/api/security.create_api_key.js +++ b/api/api/security.create_api_key.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityCreateApiKey (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.delete_privileges.js b/api/api/security.delete_privileges.js index 89031c2b1..f208616ad 100644 --- a/api/api/security.delete_privileges.js +++ b/api/api/security.delete_privileges.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,17 +52,17 @@ function buildSecurityDeletePrivileges (opts) { } // check required parameters - if (params['application'] == null) { + if (params.application == null) { const err = new ConfigurationError('Missing required parameter: application') return handleError(err, callback) } - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: application') return handleError(err, callback) } diff --git a/api/api/security.delete_role.js b/api/api/security.delete_role.js index 4dd113a6a..bbaa2646d 100644 --- a/api/api/security.delete_role.js +++ b/api/api/security.delete_role.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityDeleteRole (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/security.delete_role_mapping.js b/api/api/security.delete_role_mapping.js index 5edde79d3..951860d72 100644 --- a/api/api/security.delete_role_mapping.js +++ b/api/api/security.delete_role_mapping.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityDeleteRoleMapping (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/security.delete_user.js b/api/api/security.delete_user.js index 007da3e8c..d427ac105 100644 --- a/api/api/security.delete_user.js +++ b/api/api/security.delete_user.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityDeleteUser (opts) { } // check required parameters - if (params['username'] == null) { + if (params.username == null) { const err = new ConfigurationError('Missing required parameter: username') return handleError(err, callback) } diff --git a/api/api/security.disable_user.js b/api/api/security.disable_user.js index b89afc916..9e0d4fd24 100644 --- a/api/api/security.disable_user.js +++ b/api/api/security.disable_user.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityDisableUser (opts) { } // check required parameters - if (params['username'] == null) { + if (params.username == null) { const err = new ConfigurationError('Missing required parameter: username') return handleError(err, callback) } diff --git a/api/api/security.enable_user.js b/api/api/security.enable_user.js index 367590123..954f30ecf 100644 --- a/api/api/security.enable_user.js +++ b/api/api/security.enable_user.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityEnableUser (opts) { } // check required parameters - if (params['username'] == null) { + if (params.username == null) { const err = new ConfigurationError('Missing required parameter: username') return handleError(err, callback) } diff --git a/api/api/security.get_api_key.js b/api/api/security.get_api_key.js index 7492f84e5..d0d7d0ab3 100644 --- a/api/api/security.get_api_key.js +++ b/api/api/security.get_api_key.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/security.get_builtin_privileges.js b/api/api/security.get_builtin_privileges.js index 15581bf4f..04d8c77e5 100644 --- a/api/api/security.get_builtin_privileges.js +++ b/api/api/security.get_builtin_privileges.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/security.get_privileges.js b/api/api/security.get_privileges.js index 15a5a3a72..820dcf4cc 100644 --- a/api/api/security.get_privileges.js +++ b/api/api/security.get_privileges.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityGetPrivileges (opts) { } // check required url components - if (params['name'] != null && (params['application'] == null)) { + if (params.name != null && (params.application == null)) { const err = new ConfigurationError('Missing required parameter of the url: application') return handleError(err, callback) } diff --git a/api/api/security.get_role.js b/api/api/security.get_role.js index e660c5b8a..bd3c49a11 100644 --- a/api/api/security.get_role.js +++ b/api/api/security.get_role.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/security.get_role_mapping.js b/api/api/security.get_role_mapping.js index 0a1768512..eb11d3923 100644 --- a/api/api/security.get_role_mapping.js +++ b/api/api/security.get_role_mapping.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/security.get_token.js b/api/api/security.get_token.js index 066c9e6d0..a8c232a26 100644 --- a/api/api/security.get_token.js +++ b/api/api/security.get_token.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityGetToken (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.get_user.js b/api/api/security.get_user.js index 40383949b..0bc9e5d8b 100644 --- a/api/api/security.get_user.js +++ b/api/api/security.get_user.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/security.get_user_privileges.js b/api/api/security.get_user_privileges.js index 3ef3a9dc3..954c3b850 100644 --- a/api/api/security.get_user_privileges.js +++ b/api/api/security.get_user_privileges.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/security.has_privileges.js b/api/api/security.has_privileges.js index dc0f1d1d1..7c0aaeb3f 100644 --- a/api/api/security.has_privileges.js +++ b/api/api/security.has_privileges.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityHasPrivileges (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.invalidate_api_key.js b/api/api/security.invalidate_api_key.js index 470704850..422c78ed6 100644 --- a/api/api/security.invalidate_api_key.js +++ b/api/api/security.invalidate_api_key.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityInvalidateApiKey (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.invalidate_token.js b/api/api/security.invalidate_token.js index dc1bcf6ba..e46ce299d 100644 --- a/api/api/security.invalidate_token.js +++ b/api/api/security.invalidate_token.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityInvalidateToken (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.put_privileges.js b/api/api/security.put_privileges.js index 83df2139c..3b1120910 100644 --- a/api/api/security.put_privileges.js +++ b/api/api/security.put_privileges.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSecurityPutPrivileges (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.put_role.js b/api/api/security.put_role.js index 3de853456..501f84345 100644 --- a/api/api/security.put_role.js +++ b/api/api/security.put_role.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildSecurityPutRole (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.put_role_mapping.js b/api/api/security.put_role_mapping.js index e35a70657..e7fcae8ff 100644 --- a/api/api/security.put_role_mapping.js +++ b/api/api/security.put_role_mapping.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildSecurityPutRoleMapping (opts) { } // check required parameters - if (params['name'] == null) { + if (params.name == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.put_user.js b/api/api/security.put_user.js index 398816fa9..f92505f7d 100644 --- a/api/api/security.put_user.js +++ b/api/api/security.put_user.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildSecurityPutUser (opts) { } // check required parameters - if (params['username'] == null) { + if (params.username == null) { const err = new ConfigurationError('Missing required parameter: username') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/slm.delete_lifecycle.js b/api/api/slm.delete_lifecycle.js index 6730ea66e..604e97169 100644 --- a/api/api/slm.delete_lifecycle.js +++ b/api/api/slm.delete_lifecycle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSlmDeleteLifecycle (opts) { } // check required parameters - if (params['policy_id'] == null && params['policyId'] == null) { + if (params.policy_id == null && params.policyId == null) { const err = new ConfigurationError('Missing required parameter: policy_id or policyId') return handleError(err, callback) } diff --git a/api/api/slm.execute_lifecycle.js b/api/api/slm.execute_lifecycle.js index 669e9470e..dbf366095 100644 --- a/api/api/slm.execute_lifecycle.js +++ b/api/api/slm.execute_lifecycle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSlmExecuteLifecycle (opts) { } // check required parameters - if (params['policy_id'] == null && params['policyId'] == null) { + if (params.policy_id == null && params.policyId == null) { const err = new ConfigurationError('Missing required parameter: policy_id or policyId') return handleError(err, callback) } diff --git a/api/api/slm.execute_retention.js b/api/api/slm.execute_retention.js index c8d8db99e..6d05dd544 100644 --- a/api/api/slm.execute_retention.js +++ b/api/api/slm.execute_retention.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/slm.get_lifecycle.js b/api/api/slm.get_lifecycle.js index 22be108f6..55ad88afa 100644 --- a/api/api/slm.get_lifecycle.js +++ b/api/api/slm.get_lifecycle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/slm.get_stats.js b/api/api/slm.get_stats.js index 9937bf94f..0301494c3 100644 --- a/api/api/slm.get_stats.js +++ b/api/api/slm.get_stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/slm.get_status.js b/api/api/slm.get_status.js index 64a66cb88..88dadc8c0 100644 --- a/api/api/slm.get_status.js +++ b/api/api/slm.get_status.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/slm.put_lifecycle.js b/api/api/slm.put_lifecycle.js index 47d4e6de3..309dd8ff3 100644 --- a/api/api/slm.put_lifecycle.js +++ b/api/api/slm.put_lifecycle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSlmPutLifecycle (opts) { } // check required parameters - if (params['policy_id'] == null && params['policyId'] == null) { + if (params.policy_id == null && params.policyId == null) { const err = new ConfigurationError('Missing required parameter: policy_id or policyId') return handleError(err, callback) } diff --git a/api/api/slm.start.js b/api/api/slm.start.js index 137d0c1c9..2046817a3 100644 --- a/api/api/slm.start.js +++ b/api/api/slm.start.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/slm.stop.js b/api/api/slm.stop.js index 32ccb37a0..00050dd01 100644 --- a/api/api/slm.stop.js +++ b/api/api/slm.stop.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/snapshot.cleanup_repository.js b/api/api/snapshot.cleanup_repository.js index 7fc13cdd8..b16aebd86 100644 --- a/api/api/snapshot.cleanup_repository.js +++ b/api/api/snapshot.cleanup_repository.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildSnapshotCleanupRepository (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.create.js b/api/api/snapshot.create.js index 4c0d83631..eae0773f8 100644 --- a/api/api/snapshot.create.js +++ b/api/api/snapshot.create.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,17 +61,17 @@ function buildSnapshotCreate (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.create_repository.js b/api/api/snapshot.create_repository.js index b34dbbe8d..2561d0b22 100644 --- a/api/api/snapshot.create_repository.js +++ b/api/api/snapshot.create_repository.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,11 +61,11 @@ function buildSnapshotCreateRepository (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/snapshot.delete.js b/api/api/snapshot.delete.js index d0139ee67..528cd8f2d 100644 --- a/api/api/snapshot.delete.js +++ b/api/api/snapshot.delete.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -44,17 +59,17 @@ function buildSnapshotDelete (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.delete_repository.js b/api/api/snapshot.delete_repository.js index 337992c00..69334ef12 100644 --- a/api/api/snapshot.delete_repository.js +++ b/api/api/snapshot.delete_repository.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildSnapshotDeleteRepository (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.get.js b/api/api/snapshot.get.js index e78500b62..4640d9c58 100644 --- a/api/api/snapshot.get.js +++ b/api/api/snapshot.get.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -47,17 +62,17 @@ function buildSnapshotGet (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.get_repository.js b/api/api/snapshot.get_repository.js index c55356d66..cf5a7e183 100644 --- a/api/api/snapshot.get_repository.js +++ b/api/api/snapshot.get_repository.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/snapshot.restore.js b/api/api/snapshot.restore.js index 567b02d48..5ff366770 100644 --- a/api/api/snapshot.restore.js +++ b/api/api/snapshot.restore.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,17 +61,17 @@ function buildSnapshotRestore (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params['snapshot'] == null) { + if (params.snapshot == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.status.js b/api/api/snapshot.status.js index 9e057c997..5ac9eefa3 100644 --- a/api/api/snapshot.status.js +++ b/api/api/snapshot.status.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -46,7 +61,7 @@ function buildSnapshotStatus (opts) { } // check required url components - if (params['snapshot'] != null && (params['repository'] == null)) { + if (params.snapshot != null && (params.repository == null)) { const err = new ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.verify_repository.js b/api/api/snapshot.verify_repository.js index 1e04a2f09..f8be85c25 100644 --- a/api/api/snapshot.verify_repository.js +++ b/api/api/snapshot.verify_repository.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildSnapshotVerifyRepository (opts) { } // check required parameters - if (params['repository'] == null) { + if (params.repository == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } diff --git a/api/api/sql.clear_cursor.js b/api/api/sql.clear_cursor.js index bfa3ce6b8..cc3b2535f 100644 --- a/api/api/sql.clear_cursor.js +++ b/api/api/sql.clear_cursor.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSqlClearCursor (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/sql.query.js b/api/api/sql.query.js index 5354b8684..df07251f8 100644 --- a/api/api/sql.query.js +++ b/api/api/sql.query.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSqlQuery (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/sql.translate.js b/api/api/sql.translate.js index 652570095..30b78736d 100644 --- a/api/api/sql.translate.js +++ b/api/api/sql.translate.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildSqlTranslate (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ssl.certificates.js b/api/api/ssl.certificates.js index beef26f5f..9c19f2ef7 100644 --- a/api/api/ssl.certificates.js +++ b/api/api/ssl.certificates.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/tasks.cancel.js b/api/api/tasks.cancel.js index 03700b092..42f2d0222 100644 --- a/api/api/tasks.cancel.js +++ b/api/api/tasks.cancel.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/tasks.get.js b/api/api/tasks.get.js index 37f09539c..6594bc8f3 100644 --- a/api/api/tasks.get.js +++ b/api/api/tasks.get.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -45,7 +60,7 @@ function buildTasksGet (opts) { } // check required parameters - if (params['task_id'] == null && params['taskId'] == null) { + if (params.task_id == null && params.taskId == null) { const err = new ConfigurationError('Missing required parameter: task_id or taskId') return handleError(err, callback) } diff --git a/api/api/tasks.list.js b/api/api/tasks.list.js index ec188c579..59eba845b 100644 --- a/api/api/tasks.list.js +++ b/api/api/tasks.list.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/termvectors.js b/api/api/termvectors.js index 4e3c0886c..911818617 100644 --- a/api/api/termvectors.js +++ b/api/api/termvectors.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -56,7 +71,7 @@ function buildTermvectors (opts) { } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/transform.delete_transform.js b/api/api/transform.delete_transform.js index 6d76bfe56..4ccaee2f4 100644 --- a/api/api/transform.delete_transform.js +++ b/api/api/transform.delete_transform.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildTransformDeleteTransform (opts) { } // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } diff --git a/api/api/transform.get_transform.js b/api/api/transform.get_transform.js index 4fc5fa0e4..49164a95f 100644 --- a/api/api/transform.get_transform.js +++ b/api/api/transform.get_transform.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/transform.get_transform_stats.js b/api/api/transform.get_transform_stats.js index d139d9e00..8e265571c 100644 --- a/api/api/transform.get_transform_stats.js +++ b/api/api/transform.get_transform_stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -39,7 +54,7 @@ function buildTransformGetTransformStats (opts) { } // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } diff --git a/api/api/transform.preview_transform.js b/api/api/transform.preview_transform.js index 73aadb2c2..e7cfa5392 100644 --- a/api/api/transform.preview_transform.js +++ b/api/api/transform.preview_transform.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildTransformPreviewTransform (opts) { } // check required parameters - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/transform.put_transform.js b/api/api/transform.put_transform.js index 578f1c0b3..b4049b0f8 100644 --- a/api/api/transform.put_transform.js +++ b/api/api/transform.put_transform.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildTransformPutTransform (opts) { } // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/transform.start_transform.js b/api/api/transform.start_transform.js index b06f6a793..4eee46c18 100644 --- a/api/api/transform.start_transform.js +++ b/api/api/transform.start_transform.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildTransformStartTransform (opts) { } // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } diff --git a/api/api/transform.stop_transform.js b/api/api/transform.stop_transform.js index be60db461..b24d980e8 100644 --- a/api/api/transform.stop_transform.js +++ b/api/api/transform.stop_transform.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -43,7 +58,7 @@ function buildTransformStopTransform (opts) { } // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } diff --git a/api/api/transform.update_transform.js b/api/api/transform.update_transform.js index eaa9404ae..f34b0e2f9 100644 --- a/api/api/transform.update_transform.js +++ b/api/api/transform.update_transform.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,11 +52,11 @@ function buildTransformUpdateTransform (opts) { } // check required parameters - if (params['transform_id'] == null && params['transformId'] == null) { + if (params.transform_id == null && params.transformId == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/update.js b/api/api/update.js index 058e82bb7..572661637 100644 --- a/api/api/update.js +++ b/api/api/update.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -61,15 +76,15 @@ function buildUpdate (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params['body'] == null) { + if (params.body == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js index 2ba13c742..da1e87c57 100644 --- a/api/api/update_by_query.js +++ b/api/api/update_by_query.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -95,13 +110,13 @@ for example to pick up a mapping change. } // check required parameters - if (params['index'] == null) { + if (params.index == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/update_by_query_rethrottle.js b/api/api/update_by_query_rethrottle.js index d34a0fc2a..a118653d9 100644 --- a/api/api/update_by_query_rethrottle.js +++ b/api/api/update_by_query_rethrottle.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -44,11 +59,11 @@ function buildUpdateByQueryRethrottle (opts) { } // check required parameters - if (params['task_id'] == null && params['taskId'] == null) { + if (params.task_id == null && params.taskId == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond') return handleError(err, callback) } diff --git a/api/api/watcher.ack_watch.js b/api/api/watcher.ack_watch.js index ea399d928..275664f38 100644 --- a/api/api/watcher.ack_watch.js +++ b/api/api/watcher.ack_watch.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,13 +52,13 @@ function buildWatcherAckWatch (opts) { } // check required parameters - if (params['watch_id'] == null && params['watchId'] == null) { + if (params.watch_id == null && params.watchId == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: watch_id') return handleError(err, callback) } diff --git a/api/api/watcher.activate_watch.js b/api/api/watcher.activate_watch.js index f78edec85..a39c6b56d 100644 --- a/api/api/watcher.activate_watch.js +++ b/api/api/watcher.activate_watch.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildWatcherActivateWatch (opts) { } // check required parameters - if (params['watch_id'] == null && params['watchId'] == null) { + if (params.watch_id == null && params.watchId == null) { const err = new ConfigurationError('Missing required parameter: watch_id or watchId') return handleError(err, callback) } diff --git a/api/api/watcher.deactivate_watch.js b/api/api/watcher.deactivate_watch.js index add97ef75..9cebf9b86 100644 --- a/api/api/watcher.deactivate_watch.js +++ b/api/api/watcher.deactivate_watch.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildWatcherDeactivateWatch (opts) { } // check required parameters - if (params['watch_id'] == null && params['watchId'] == null) { + if (params.watch_id == null && params.watchId == null) { const err = new ConfigurationError('Missing required parameter: watch_id or watchId') return handleError(err, callback) } diff --git a/api/api/watcher.delete_watch.js b/api/api/watcher.delete_watch.js index 544480b14..222e8a2cc 100644 --- a/api/api/watcher.delete_watch.js +++ b/api/api/watcher.delete_watch.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildWatcherDeleteWatch (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/watcher.execute_watch.js b/api/api/watcher.execute_watch.js index 62bf13a11..5ee4068f0 100644 --- a/api/api/watcher.execute_watch.js +++ b/api/api/watcher.execute_watch.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/watcher.get_watch.js b/api/api/watcher.get_watch.js index 61e693964..230b97230 100644 --- a/api/api/watcher.get_watch.js +++ b/api/api/watcher.get_watch.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -37,7 +52,7 @@ function buildWatcherGetWatch (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/watcher.put_watch.js b/api/api/watcher.put_watch.js index 1a60b2d4b..3369ff279 100644 --- a/api/api/watcher.put_watch.js +++ b/api/api/watcher.put_watch.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -41,7 +56,7 @@ function buildWatcherPutWatch (opts) { } // check required parameters - if (params['id'] == null) { + if (params.id == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/watcher.start.js b/api/api/watcher.start.js index c9e3b9047..60b371b71 100644 --- a/api/api/watcher.start.js +++ b/api/api/watcher.start.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/watcher.stats.js b/api/api/watcher.stats.js index 647b733f6..58f54d872 100644 --- a/api/api/watcher.stats.js +++ b/api/api/watcher.stats.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/watcher.stop.js b/api/api/watcher.stop.js index ac5a97d88..1f4385247 100644 --- a/api/api/watcher.stop.js +++ b/api/api/watcher.stop.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/xpack.info.js b/api/api/xpack.info.js index 4d12aa3cd..12cb4f496 100644 --- a/api/api/xpack.info.js +++ b/api/api/xpack.info.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/api/xpack.usage.js b/api/api/xpack.usage.js index bebe72ee5..efef3d792 100644 --- a/api/api/xpack.usage.js +++ b/api/api/xpack.usage.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/index.js b/api/index.js index 3b9c905e4..e4efdda0e 100644 --- a/api/index.js +++ b/api/index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/api/kibana.d.ts b/api/kibana.d.ts index 88c2cbb1f..074a5ba43 100644 --- a/api/kibana.d.ts +++ b/api/kibana.d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /// diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index cbc78d033..0f4adb4ac 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { RequestBody, RequestNDBody } from '../lib/Transport' diff --git a/index.d.ts b/index.d.ts index 4f2673652..c0df4236f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /// diff --git a/index.js b/index.js index 0538d2b7c..5f309ce1b 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/index.mjs b/index.mjs index 2a7fbb6a9..c23a3d832 100644 --- a/index.mjs +++ b/index.mjs @@ -1,3 +1,22 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + import mod from './index.js' export default mod diff --git a/lib/Connection.d.ts b/lib/Connection.d.ts index dda06aec3..c855d7e56 100644 --- a/lib/Connection.d.ts +++ b/lib/Connection.d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /// diff --git a/lib/Connection.js b/lib/Connection.js index 7ab7b43a8..32c258a05 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/lib/Helpers.d.ts b/lib/Helpers.d.ts index 70af79c60..234b48181 100644 --- a/lib/Helpers.d.ts +++ b/lib/Helpers.d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { Readable as ReadableStream } from 'stream' import { TransportRequestOptions, ApiError, ApiResponse, RequestBody, Context } from './Transport' diff --git a/lib/Helpers.js b/lib/Helpers.js index 739453213..b505a0ce9 100644 --- a/lib/Helpers.js +++ b/lib/Helpers.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/lib/Serializer.d.ts b/lib/Serializer.d.ts index a5a8f8d27..bf8453ab3 100644 --- a/lib/Serializer.d.ts +++ b/lib/Serializer.d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ export default class Serializer { serialize(object: any): string; diff --git a/lib/Serializer.js b/lib/Serializer.js index aa9d1065b..c2cd41b68 100644 --- a/lib/Serializer.js +++ b/lib/Serializer.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/lib/Transport.d.ts b/lib/Transport.d.ts index b53eecd67..979393a60 100644 --- a/lib/Transport.d.ts +++ b/lib/Transport.d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { Readable as ReadableStream } from 'stream'; import { ConnectionPool, CloudConnectionPool } from './pool'; diff --git a/lib/Transport.js b/lib/Transport.js index a53e73b03..57b3f8a11 100644 --- a/lib/Transport.js +++ b/lib/Transport.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -168,10 +183,10 @@ class Transport { const { statusCode, headers } = response result.statusCode = statusCode result.headers = headers - if (headers['warning'] !== undefined) { + if (headers.warning !== undefined) { result.warnings = result.warnings || [] // split the string over the commas not inside quotes - result.warnings.push.apply(result.warnings, headers['warning'].split(/(?!\B"[^"]*),(?![^"]*"\B)/)) + result.warnings.push.apply(result.warnings, headers.warning.split(/(?!\B"[^"]*),(?![^"]*"\B)/)) } if (options.asStream === true) { diff --git a/lib/errors.d.ts b/lib/errors.d.ts index d7276a4e8..12241e486 100644 --- a/lib/errors.d.ts +++ b/lib/errors.d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { ApiResponse, Context } from './Transport' diff --git a/lib/errors.js b/lib/errors.js index b96aa811e..5f6d199d4 100644 --- a/lib/errors.js +++ b/lib/errors.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/lib/pool/BaseConnectionPool.js b/lib/pool/BaseConnectionPool.js index 8d5e0e8d6..7bc838828 100644 --- a/lib/pool/BaseConnectionPool.js +++ b/lib/pool/BaseConnectionPool.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/lib/pool/CloudConnectionPool.js b/lib/pool/CloudConnectionPool.js index 27598225c..6f68f6149 100644 --- a/lib/pool/CloudConnectionPool.js +++ b/lib/pool/CloudConnectionPool.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/lib/pool/ConnectionPool.js b/lib/pool/ConnectionPool.js index cdcad3ea4..5a6c09a6b 100644 --- a/lib/pool/ConnectionPool.js +++ b/lib/pool/ConnectionPool.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/lib/pool/index.d.ts b/lib/pool/index.d.ts index bbad18710..a13186ee5 100644 --- a/lib/pool/index.d.ts +++ b/lib/pool/index.d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /// diff --git a/lib/pool/index.js b/lib/pool/index.js index 1cdf1ed4c..59fc74b3e 100644 --- a/lib/pool/index.js +++ b/lib/pool/index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/scripts/generate.js b/scripts/generate.js index d24e9b7ed..732af2ff0 100644 --- a/scripts/generate.js +++ b/scripts/generate.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/scripts/utils/clone-es.js b/scripts/utils/clone-es.js index d412ccc98..05608eeaa 100644 --- a/scripts/utils/clone-es.js +++ b/scripts/utils/clone-es.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/scripts/utils/generateApis.js b/scripts/utils/generateApis.js index bf80a9a36..4eacdcb06 100644 --- a/scripts/utils/generateApis.js +++ b/scripts/utils/generateApis.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /* eslint camelcase: 0 */ @@ -170,9 +185,24 @@ function generate (version, spec, common) { `.trim() // always call trim to avoid newlines const fn = dedent` - // Licensed to Elasticsearch B.V under one or more agreements. - // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. - // See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -434,9 +464,9 @@ function genBody (api, methods, body) { return 'bulkBody: body,' } if (body === null && bodyMethod) { - return `body: '',` + return 'body: \'\',' } else if (bodyMethod) { - return `body: body || '',` + return 'body: body || \'\',' } else { return 'body: null,' } diff --git a/scripts/utils/generateDocs.js b/scripts/utils/generateDocs.js index 6cb886f5b..90e44fbd4 100644 --- a/scripts/utils/generateDocs.js +++ b/scripts/utils/generateDocs.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -222,7 +237,7 @@ function generateApiDoc (spec) { acc += ` +\n_Default:_ ${'`' + val.default + '`'}` } if (val.deprecated) { - acc += ` +\n\nWARNING: This parameter has been deprecated.` + acc += ' +\n\nWARNING: This parameter has been deprecated.' } return acc + '\n\n' }, '') diff --git a/scripts/utils/generateMain.js b/scripts/utils/generateMain.js index f3223688a..8e99d40c7 100644 --- a/scripts/utils/generateMain.js +++ b/scripts/utils/generateMain.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /* eslint-disable no-template-curly-in-string */ @@ -138,9 +153,24 @@ function genFactory (folder, paths) { .replace(/,$/gm, '') const fn = dedent` - // Licensed to Elasticsearch B.V under one or more agreements. - // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. - // See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -224,44 +254,44 @@ function buildMethodDefinition (opts, api, name, hasBody) { if (opts.kibana) { if (hasBody) { return [ - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` } + { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' } ] } else { return [ - { key: `${camelify(api)}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` } + { key: `${camelify(api)}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' } ] } } if (hasBody) { let methods = [ - { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` }, - { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(callback: callbackFn)`, val: `TransportRequestCallback` }, - { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: `TransportRequestCallback` }, - { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: `TransportRequestCallback` } + { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' }, + { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(callback: callbackFn)`, val: 'TransportRequestCallback' }, + { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: 'TransportRequestCallback' }, + { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: 'TransportRequestCallback' } ] if (isSnakeCased(api)) { methods = methods.concat([ - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` }, - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(callback: callbackFn)`, val: `TransportRequestCallback` }, - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: `TransportRequestCallback` }, - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: `TransportRequestCallback` } + { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' }, + { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(callback: callbackFn)`, val: 'TransportRequestCallback' }, + { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: 'TransportRequestCallback' }, + { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: 'TransportRequestCallback' } ]) } return methods } else { let methods = [ - { key: `${api}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` }, - { key: `${api}, TContext = Context>(callback: callbackFn)`, val: `TransportRequestCallback` }, - { key: `${api}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: `TransportRequestCallback` }, - { key: `${api}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: `TransportRequestCallback` } + { key: `${api}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' }, + { key: `${api}, TContext = Context>(callback: callbackFn)`, val: 'TransportRequestCallback' }, + { key: `${api}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: 'TransportRequestCallback' }, + { key: `${api}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: 'TransportRequestCallback' } ] if (isSnakeCased(api)) { methods = methods.concat([ - { key: `${camelify(api)}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` }, - { key: `${camelify(api)}, TContext = Context>(callback: callbackFn)`, val: `TransportRequestCallback` }, - { key: `${camelify(api)}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: `TransportRequestCallback` }, - { key: `${camelify(api)}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: `TransportRequestCallback` } + { key: `${camelify(api)}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' }, + { key: `${camelify(api)}, TContext = Context>(callback: callbackFn)`, val: 'TransportRequestCallback' }, + { key: `${camelify(api)}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: 'TransportRequestCallback' }, + { key: `${camelify(api)}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: 'TransportRequestCallback' } ]) } return methods diff --git a/scripts/utils/generateRequestTypes.js b/scripts/utils/generateRequestTypes.js index 4e4f389b2..0a5963efd 100644 --- a/scripts/utils/generateRequestTypes.js +++ b/scripts/utils/generateRequestTypes.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -18,9 +33,24 @@ const ndjsonApiKey = ndjsonApi function generate (version, api) { const release = semver.valid(version) ? semver.major(version) : version - var types = `// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + var types = `/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { RequestBody, RequestNDBody } from '../lib/Transport' diff --git a/scripts/utils/index.js b/scripts/utils/index.js index bdfa4956b..77578cf9a 100644 --- a/scripts/utils/index.js +++ b/scripts/utils/index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/acceptance/resurrect.test.js b/test/acceptance/resurrect.test.js index 40f316d94..2c5aaf0b5 100644 --- a/test/acceptance/resurrect.test.js +++ b/test/acceptance/resurrect.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/acceptance/sniff.test.js b/test/acceptance/sniff.test.js index 065e424ac..a81c6f7fd 100644 --- a/test/acceptance/sniff.test.js +++ b/test/acceptance/sniff.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/integration/helper.js b/test/integration/helper.js index cc1a90d93..0c0567e80 100644 --- a/test/integration/helper.js +++ b/test/integration/helper.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/integration/helpers/bulk.test.js b/test/integration/helpers/bulk.test.js index 4bef30ccd..1966f39b1 100644 --- a/test/integration/helpers/bulk.test.js +++ b/test/integration/helpers/bulk.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/integration/helpers/msearch.test.js b/test/integration/helpers/msearch.test.js index d3a4f3ba8..e387b4fa9 100644 --- a/test/integration/helpers/msearch.test.js +++ b/test/integration/helpers/msearch.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/integration/helpers/scroll.test.js b/test/integration/helpers/scroll.test.js index c1a5e3a64..93594bccf 100644 --- a/test/integration/helpers/scroll.test.js +++ b/test/integration/helpers/scroll.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/integration/helpers/search.test.js b/test/integration/helpers/search.test.js index bb845eaa9..247fc9ac9 100644 --- a/test/integration/helpers/search.test.js +++ b/test/integration/helpers/search.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/integration/index.js b/test/integration/index.js index 615690ee3..0bc07382e 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/integration/test-runner.js b/test/integration/test-runner.js index 8f1160460..a540c7872 100644 --- a/test/integration/test-runner.js +++ b/test/integration/test-runner.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/types/api-response-body.test-d.ts b/test/types/api-response-body.test-d.ts index 6a20beb27..b3a124bf5 100644 --- a/test/types/api-response-body.test-d.ts +++ b/test/types/api-response-body.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { expectType, expectError } from 'tsd' import { Readable as ReadableStream } from 'stream'; diff --git a/test/types/api-response.test-d.ts b/test/types/api-response.test-d.ts index 4987d6c12..a546f6a33 100644 --- a/test/types/api-response.test-d.ts +++ b/test/types/api-response.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { expectType } from 'tsd' import { TransportRequestCallback, Context } from '../../lib/Transport' diff --git a/test/types/client-options.test-d.ts b/test/types/client-options.test-d.ts index a99ff610a..d313b7548 100644 --- a/test/types/client-options.test-d.ts +++ b/test/types/client-options.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { URL } from 'url' import { expectType, expectError } from 'tsd' diff --git a/test/types/client.test-d.ts b/test/types/client.test-d.ts index e70cc23eb..a37e16393 100644 --- a/test/types/client.test-d.ts +++ b/test/types/client.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { expectType } from 'tsd' import { Client, ApiError, ApiResponse, RequestEvent, ResurrectEvent } from '../../' diff --git a/test/types/connection-pool.test-d.ts b/test/types/connection-pool.test-d.ts index 4354e66ca..b2298f45e 100644 --- a/test/types/connection-pool.test-d.ts +++ b/test/types/connection-pool.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { expectType, expectAssignable } from 'tsd' import { URL } from 'url' diff --git a/test/types/connection.test-d.ts b/test/types/connection.test-d.ts index b6c5ddba3..c6b70786b 100644 --- a/test/types/connection.test-d.ts +++ b/test/types/connection.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { expectType } from 'tsd' import { URL } from 'url' diff --git a/test/types/errors.test-d.ts b/test/types/errors.test-d.ts index 8c08ae7fa..522ff63f3 100644 --- a/test/types/errors.test-d.ts +++ b/test/types/errors.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { expectType } from 'tsd' import { errors, ApiResponse, Connection } from '../../' diff --git a/test/types/helpers.test-d.ts b/test/types/helpers.test-d.ts index a72f41732..3610150c3 100644 --- a/test/types/helpers.test-d.ts +++ b/test/types/helpers.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { expectType, expectError, expectAssignable } from 'tsd' import { Client } from '../../' diff --git a/test/types/kibana.test-d.ts b/test/types/kibana.test-d.ts index 6bc95f6fe..9740e69de 100644 --- a/test/types/kibana.test-d.ts +++ b/test/types/kibana.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { expectType, expectNotType, expectError } from 'tsd' import { Client, RequestEvent, ResurrectEvent, ApiError, ApiResponse } from '../../' diff --git a/test/types/serializer.test-d.ts b/test/types/serializer.test-d.ts index 885e0d09f..fcb21f65f 100644 --- a/test/types/serializer.test-d.ts +++ b/test/types/serializer.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { expectType } from 'tsd' import { Serializer } from '../../' diff --git a/test/types/transport.test-d.ts b/test/types/transport.test-d.ts index b6e7d665c..53aff583f 100644 --- a/test/types/transport.test-d.ts +++ b/test/types/transport.test-d.ts @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information + /* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ import { Readable as ReadableStream } from 'stream'; import { expectType, expectAssignable, expectError } from 'tsd' diff --git a/test/unit/api-async.js b/test/unit/api-async.js index 1821836a2..437c00abf 100644 --- a/test/unit/api-async.js +++ b/test/unit/api-async.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/api.test.js b/test/unit/api.test.js index ad61a71e1..c851224e1 100644 --- a/test/unit/api.test.js +++ b/test/unit/api.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/base-connection-pool.test.js b/test/unit/base-connection-pool.test.js index 74d4ff3b7..d313a774b 100644 --- a/test/unit/base-connection-pool.test.js +++ b/test/unit/base-connection-pool.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/child.test.js b/test/unit/child.test.js index e6a2b91ea..110a7e866 100644 --- a/test/unit/child.test.js +++ b/test/unit/child.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/client.test.js b/test/unit/client.test.js index 57630bac0..aac8354a7 100644 --- a/test/unit/client.test.js +++ b/test/unit/client.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -1034,8 +1049,8 @@ test('Correctly handles the same header cased differently', t => { t.plan(4) function handler (req, res) { - t.strictEqual(req.headers['authorization'], 'Basic foobar') - t.strictEqual(req.headers['foo'], 'baz') + t.strictEqual(req.headers.authorization, 'Basic foobar') + t.strictEqual(req.headers.foo, 'baz') res.setHeader('Content-Type', 'application/json;utf=8') res.end(JSON.stringify({ hello: 'world' })) } diff --git a/test/unit/cloud-connection-pool.test.js b/test/unit/cloud-connection-pool.test.js index e0cb1a499..ccefcc337 100644 --- a/test/unit/cloud-connection-pool.test.js +++ b/test/unit/cloud-connection-pool.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/connection-pool.test.js b/test/unit/connection-pool.test.js index b8c412d16..bb40382db 100644 --- a/test/unit/connection-pool.test.js +++ b/test/unit/connection-pool.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/connection.test.js b/test/unit/connection.test.js index 2853942f1..03c6e2703 100644 --- a/test/unit/connection.test.js +++ b/test/unit/connection.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -950,7 +965,7 @@ test('Should correctly resolve request pathname', t => { t.plan(1) const connection = new Connection({ - url: new URL(`http://localhost:80/test`) + url: new URL('http://localhost:80/test') }) t.strictEqual( diff --git a/test/unit/errors.test.js b/test/unit/errors.test.js index 972cf8479..147304308 100644 --- a/test/unit/errors.test.js +++ b/test/unit/errors.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/events.test.js b/test/unit/events.test.js index b578ba2b2..4602c0ed7 100644 --- a/test/unit/events.test.js +++ b/test/unit/events.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/helpers/bulk.test.js b/test/unit/helpers/bulk.test.js index d0ea40092..6822905e7 100644 --- a/test/unit/helpers/bulk.test.js +++ b/test/unit/helpers/bulk.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' @@ -640,7 +655,7 @@ test('bulk index', t => { }) .catch(err => { t.true(err instanceof errors.ConfigurationError) - t.is(err.message, `Bulk helper invalid action: 'foo'`) + t.is(err.message, 'Bulk helper invalid action: \'foo\'') }) }) diff --git a/test/unit/helpers/msearch.test.js b/test/unit/helpers/msearch.test.js index 63abfad15..524a10258 100644 --- a/test/unit/helpers/msearch.test.js +++ b/test/unit/helpers/msearch.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/helpers/scroll.test.js b/test/unit/helpers/scroll.test.js index 5571265de..c4ef16168 100644 --- a/test/unit/helpers/scroll.test.js +++ b/test/unit/helpers/scroll.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/helpers/search.test.js b/test/unit/helpers/search.test.js index e1edbd48d..06ce5870a 100644 --- a/test/unit/helpers/search.test.js +++ b/test/unit/helpers/search.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/selectors.test.js b/test/unit/selectors.test.js index 2cfd1687f..8985f90fe 100644 --- a/test/unit/selectors.test.js +++ b/test/unit/selectors.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/serializer.test.js b/test/unit/serializer.test.js index 329762785..cce887e7a 100644 --- a/test/unit/serializer.test.js +++ b/test/unit/serializer.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/unit/transport.test.js b/test/unit/transport.test.js index bdd9bdeb2..aaaec5c2a 100644 --- a/test/unit/transport.test.js +++ b/test/unit/transport.test.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/utils/MockConnection.js b/test/utils/MockConnection.js index d6154654e..5b3aac272 100644 --- a/test/utils/MockConnection.js +++ b/test/utils/MockConnection.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/utils/buildCluster.js b/test/utils/buildCluster.js index f30c1c241..2cfeea65d 100644 --- a/test/utils/buildCluster.js +++ b/test/utils/buildCluster.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/utils/buildServer.js b/test/utils/buildServer.js index f661509aa..e21759bbc 100644 --- a/test/utils/buildServer.js +++ b/test/utils/buildServer.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' diff --git a/test/utils/index.js b/test/utils/index.js index 3b34c7fc4..b6b189ccd 100644 --- a/test/utils/index.js +++ b/test/utils/index.js @@ -1,6 +1,21 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ 'use strict' From 4c1095d805687d7fdf9372d2731e2250fdcacc02 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2020 11:41:20 +0200 Subject: [PATCH 2/8] [Backport 7.x] Added proxy support (#1276) Co-authored-by: Tomas Della Vedova --- docs/configuration.asciidoc | 18 ++++ docs/usage.asciidoc | 39 ++++++++ index.d.ts | 1 + index.js | 4 +- lib/Connection.d.ts | 5 +- lib/Connection.js | 14 ++- lib/pool/BaseConnectionPool.js | 3 + lib/pool/index.d.ts | 2 + package.json | 2 + test/acceptance/proxy.test.js | 149 ++++++++++++++++++++++++++++ test/acceptance/sniff.test.js | 3 +- test/types/client-options.test-d.ts | 25 +++++ test/unit/connection.test.js | 23 +++++ test/utils/buildProxy.js | 60 +++++++++++ test/utils/index.js | 2 + 15 files changed, 344 insertions(+), 6 deletions(-) create mode 100644 test/acceptance/proxy.test.js create mode 100644 test/utils/buildProxy.js diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index b9850b6e8..20f09df7b 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -117,6 +117,24 @@ _Default:_ `false` |`http.SecureContextOptions` - ssl https://nodejs.org/api/tls.html[configuraton]. + _Default:_ `null` +|`proxy` +a|`string, URL` - If you are using an http(s) proxy, you can put its url here. +The client will automatically handle the connection to it. + +_Default:_ `null` +[source,js] +---- +const client = new Client({ + node: 'http://localhost:9200', + proxy: 'http://localhost:8080' +}) + +// Proxy with basic authentication +const client = new Client({ + node: 'http://localhost:9200', + proxy: 'http://user:pwd@localhost:8080' +}) +---- + |`agent` a|`http.AgentOptions, function` - http agent https://nodejs.org/api/http.html#http_new_agent_options[options], or a function that returns an actual http agent instance. If you want to disable the http agent use entirely diff --git a/docs/usage.asciidoc b/docs/usage.asciidoc index c1e946b1a..429a6d958 100644 --- a/docs/usage.asciidoc +++ b/docs/usage.asciidoc @@ -210,6 +210,45 @@ _Default:_ `null` _Default:_ `null` |=== +=== Connecting through a proxy + +~Added~ ~in~ ~`v7.10.0`~ + +If you need to pass through an http(s) proxy for connecting to Elasticsearch, the client offers +out of the box a handy configuration for helping you with it. Under the hood it +uses the https://github.com/delvedor/hpagent[`hpagent`] module. + +[source,js] +---- +const client = new Client({ + node: 'http://localhost:9200', + proxy: 'http://localhost:8080' +}) +---- + +Basic authentication is supported as well: + +[source,js] +---- +const client = new Client({ + node: 'http://localhost:9200', + proxy: 'http:user:pwd@//localhost:8080' +}) +---- + +If you are connecting through a not http(s) proxy, such as a `socks5` or `pac`, +you can use the `agent` option to configure it. + +[source,js] +---- +const SocksProxyAgent = require('socks-proxy-agent') +const client = new Client({ + node: 'http://localhost:9200', + agent () { + return new SocksProxyAgent('socks://127.0.0.1:1080') + } +}) +---- === Error handling diff --git a/index.d.ts b/index.d.ts index c0df4236f..90ddacfb9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -107,6 +107,7 @@ interface ClientOptions { name?: string | symbol; auth?: BasicAuth | ApiKeyAuth; context?: Context; + proxy?: string | URL; cloud?: { id: string; // TODO: remove username and password here in 8 diff --git a/index.js b/index.js index 5f309ce1b..466a51988 100644 --- a/index.js +++ b/index.js @@ -100,7 +100,8 @@ class Client { name: 'elasticsearch-js', auth: null, opaqueIdPrefix: null, - context: null + context: null, + proxy: null }, opts) this[kInitialOptions] = options @@ -119,6 +120,7 @@ class Client { resurrectStrategy: options.resurrectStrategy, ssl: options.ssl, agent: options.agent, + proxy: options.proxy, Connection: options.Connection, auth: options.auth, emit: this[kEventEmitter].emit.bind(this[kEventEmitter]), diff --git a/lib/Connection.d.ts b/lib/Connection.d.ts index c855d7e56..ade470e73 100644 --- a/lib/Connection.d.ts +++ b/lib/Connection.d.ts @@ -24,6 +24,8 @@ import { inspect, InspectOptions } from 'util' import { Readable as ReadableStream } from 'stream'; import { ApiKeyAuth, BasicAuth } from './pool' import * as http from 'http' +import * as https from 'https' +import * as hpagent from 'hpagent' import { ConnectionOptions as TlsConnectionOptions } from 'tls' export declare type agentFn = () => any; @@ -37,6 +39,7 @@ interface ConnectionOptions { status?: string; roles?: ConnectionRoles; auth?: BasicAuth | ApiKeyAuth; + proxy?: string | URL; } interface ConnectionRoles { @@ -81,7 +84,7 @@ export default class Connection { makeRequest: any _openRequests: number _status: string - _agent: http.Agent + _agent: http.Agent | https.Agent | hpagent.HttpProxyAgent | hpagent.HttpsProxyAgent constructor(opts?: ConnectionOptions) request(params: RequestOptions, callback: (err: Error | null, response: http.IncomingMessage | null) => void): http.ClientRequest close(): Connection diff --git a/lib/Connection.js b/lib/Connection.js index 32c258a05..3eebea6b7 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -21,6 +21,7 @@ const assert = require('assert') const { inspect } = require('util') +const hpagent = require('hpagent') const http = require('http') const https = require('https') const debug = require('debug')('elasticsearch') @@ -63,9 +64,16 @@ class Connection { maxFreeSockets: 256, scheduling: 'lifo' }, opts.agent) - this.agent = this.url.protocol === 'http:' - ? new http.Agent(agentOptions) - : new https.Agent(Object.assign({}, agentOptions, this.ssl)) + if (opts.proxy) { + agentOptions.proxy = opts.proxy + this.agent = this.url.protocol === 'http:' + ? new hpagent.HttpProxyAgent(agentOptions) + : new hpagent.HttpsProxyAgent(Object.assign({}, agentOptions, this.ssl)) + } else { + this.agent = this.url.protocol === 'http:' + ? new http.Agent(agentOptions) + : new https.Agent(Object.assign({}, agentOptions, this.ssl)) + } } this.makeRequest = this.url.protocol === 'http:' diff --git a/lib/pool/BaseConnectionPool.js b/lib/pool/BaseConnectionPool.js index 7bc838828..8975ea2be 100644 --- a/lib/pool/BaseConnectionPool.js +++ b/lib/pool/BaseConnectionPool.js @@ -35,6 +35,7 @@ class BaseConnectionPool { this.auth = opts.auth || null this._ssl = opts.ssl this._agent = opts.agent + this._proxy = opts.proxy || null } getConnection () { @@ -69,6 +70,8 @@ class BaseConnectionPool { if (opts.ssl == null) opts.ssl = this._ssl /* istanbul ignore else */ if (opts.agent == null) opts.agent = this._agent + /* istanbul ignore else */ + if (opts.proxy == null) opts.proxy = this._proxy const connection = new this.Connection(opts) diff --git a/lib/pool/index.d.ts b/lib/pool/index.d.ts index a13186ee5..246f88d2b 100644 --- a/lib/pool/index.d.ts +++ b/lib/pool/index.d.ts @@ -27,6 +27,7 @@ import { nodeFilterFn, nodeSelectorFn } from '../Transport'; interface BaseConnectionPoolOptions { ssl?: SecureContextOptions; agent?: AgentOptions; + proxy?: string | URL; auth?: BasicAuth | ApiKeyAuth; emit: (event: string | symbol, ...args: any[]) => boolean; Connection: typeof Connection; @@ -83,6 +84,7 @@ declare class BaseConnectionPool { emit: (event: string | symbol, ...args: any[]) => boolean; _ssl: SecureContextOptions | null; _agent: AgentOptions | null; + _proxy: string | URL; auth: BasicAuth | ApiKeyAuth; Connection: typeof Connection; constructor(opts?: BaseConnectionPoolOptions); diff --git a/package.json b/package.json index a98a5abc3..31c4b6bf9 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "minimist": "^1.2.0", "ora": "^3.4.0", "pretty-hrtime": "^1.0.3", + "proxy": "^1.0.2", "rimraf": "^2.6.3", "semver": "^6.0.0", "simple-git": "^1.110.0", @@ -75,6 +76,7 @@ "dependencies": { "debug": "^4.1.1", "decompress-response": "^4.2.0", + "hpagent": "^0.1.1", "ms": "^2.1.1", "pump": "^3.0.0", "secure-json-parse": "^2.1.0" diff --git a/test/acceptance/proxy.test.js b/test/acceptance/proxy.test.js new file mode 100644 index 000000000..9210b6586 --- /dev/null +++ b/test/acceptance/proxy.test.js @@ -0,0 +1,149 @@ +'use strict' + +// We are using self-signed certificates +process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 + +const { test } = require('tap') +const { Client } = require('../../index') +const { + buildProxy: { + createProxy, + createSecureProxy, + createServer, + createSecureServer + } +} = require('../utils') + +test('http-http proxy support', async t => { + const server = await createServer() + const proxy = await createProxy() + server.on('request', (req, res) => { + t.strictEqual(req.url, '/_cluster/health') + res.setHeader('content-type', 'application/json') + res.end(JSON.stringify({ hello: 'world' })) + }) + + const client = new Client({ + node: `http://${server.address().address}:${server.address().port}`, + proxy: `http://${proxy.address().address}:${proxy.address().port}` + }) + + const response = await client.cluster.health() + t.deepEqual(response.body, { hello: 'world' }) + + server.close() + proxy.close() +}) + +test('http-https proxy support', async t => { + const server = await createSecureServer() + const proxy = await createProxy() + server.on('request', (req, res) => { + t.strictEqual(req.url, '/_cluster/health') + res.setHeader('content-type', 'application/json') + res.end(JSON.stringify({ hello: 'world' })) + }) + + const client = new Client({ + node: `https://${server.address().address}:${server.address().port}`, + proxy: `http://${proxy.address().address}:${proxy.address().port}` + }) + + const response = await client.cluster.health() + t.deepEqual(response.body, { hello: 'world' }) + + server.close() + proxy.close() +}) + +test('https-http proxy support', async t => { + const server = await createServer() + const proxy = await createSecureProxy() + server.on('request', (req, res) => { + t.strictEqual(req.url, '/_cluster/health') + res.setHeader('content-type', 'application/json') + res.end(JSON.stringify({ hello: 'world' })) + }) + + const client = new Client({ + node: `http://${server.address().address}:${server.address().port}`, + proxy: `https://${proxy.address().address}:${proxy.address().port}` + }) + + const response = await client.cluster.health() + t.deepEqual(response.body, { hello: 'world' }) + + server.close() + proxy.close() +}) + +test('https-https proxy support', async t => { + const server = await createSecureServer() + const proxy = await createSecureProxy() + server.on('request', (req, res) => { + t.strictEqual(req.url, '/_cluster/health') + res.setHeader('content-type', 'application/json') + res.end(JSON.stringify({ hello: 'world' })) + }) + + const client = new Client({ + node: `https://${server.address().address}:${server.address().port}`, + proxy: `https://${proxy.address().address}:${proxy.address().port}` + }) + + const response = await client.cluster.health() + t.deepEqual(response.body, { hello: 'world' }) + + server.close() + proxy.close() +}) + +test('http basic authentication', async t => { + const server = await createServer() + const proxy = await createProxy() + server.on('request', (req, res) => { + t.strictEqual(req.url, '/_cluster/health') + res.setHeader('content-type', 'application/json') + res.end(JSON.stringify({ hello: 'world' })) + }) + + proxy.authenticate = function (req, fn) { + fn(null, req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`) + } + + const client = new Client({ + node: `http://${server.address().address}:${server.address().port}`, + proxy: `http://hello:world@${proxy.address().address}:${proxy.address().port}` + }) + + const response = await client.cluster.health() + t.deepEqual(response.body, { hello: 'world' }) + + server.close() + proxy.close() +}) + +test('https basic authentication', async t => { + const server = await createSecureServer() + const proxy = await createProxy() + server.on('request', (req, res) => { + t.strictEqual(req.url, '/_cluster/health') + res.setHeader('content-type', 'application/json') + res.end(JSON.stringify({ hello: 'world' })) + }) + + proxy.authenticate = function (req, fn) { + fn(null, req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`) + } + + const client = new Client({ + node: `https://${server.address().address}:${server.address().port}`, + proxy: `http://hello:world@${proxy.address().address}:${proxy.address().port}` + }) + + const response = await client.cluster.health() + t.deepEqual(response.body, { hello: 'world' }) + + server.close() + proxy.close() +}) diff --git a/test/acceptance/sniff.test.js b/test/acceptance/sniff.test.js index a81c6f7fd..dbd62db88 100644 --- a/test/acceptance/sniff.test.js +++ b/test/acceptance/sniff.test.js @@ -84,7 +84,8 @@ test('Should update the connection pool', t => { ml: false }, ssl: null, - agent: null + agent: null, + proxy: null }) } } diff --git a/test/types/client-options.test-d.ts b/test/types/client-options.test-d.ts index d313b7548..a99d0465f 100644 --- a/test/types/client-options.test-d.ts +++ b/test/types/client-options.test-d.ts @@ -692,3 +692,28 @@ expectError( context: 'hello world' }) ) + +/** + * `proxy` option + */ +expectType( + new Client({ + node: 'http://localhost:9200', + proxy: 'http://localhost:8080' + }) +) + +expectType( + new Client({ + node: 'http://localhost:9200', + proxy: new URL('http://localhost:8080') + }) +) + +expectError( + // @ts-expect-error + new Client({ + node: 'http://localhost:9200', + proxy: 42 + }) +) diff --git a/test/unit/connection.test.js b/test/unit/connection.test.js index 03c6e2703..e866c8d6f 100644 --- a/test/unit/connection.test.js +++ b/test/unit/connection.test.js @@ -24,6 +24,7 @@ const { inspect } = require('util') const { createGzip, createDeflate } = require('zlib') const { URL } = require('url') const { Agent } = require('http') +const hpagent = require('hpagent') const intoStream = require('into-stream') const { buildServer } = require('../utils') const Connection = require('../../lib/Connection') @@ -975,3 +976,25 @@ test('Should correctly resolve request pathname', t => { '/test/hello' ) }) + +test('Proxy agent (http)', t => { + t.plan(1) + + const connection = new Connection({ + url: new URL('http://localhost:9200'), + proxy: 'http://localhost:8080' + }) + + t.true(connection.agent instanceof hpagent.HttpProxyAgent) +}) + +test('Proxy agent (https)', t => { + t.plan(1) + + const connection = new Connection({ + url: new URL('https://localhost:9200'), + proxy: 'http://localhost:8080' + }) + + t.true(connection.agent instanceof hpagent.HttpsProxyAgent) +}) diff --git a/test/utils/buildProxy.js b/test/utils/buildProxy.js new file mode 100644 index 000000000..442df4608 --- /dev/null +++ b/test/utils/buildProxy.js @@ -0,0 +1,60 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +const proxy = require('proxy') +const { readFileSync } = require('fs') +const { join } = require('path') +const http = require('http') +const https = require('https') + +const ssl = { + key: readFileSync(join(__dirname, '..', 'fixtures', 'https.key')), + cert: readFileSync(join(__dirname, '..', 'fixtures', 'https.cert')) +} + +function createProxy () { + return new Promise((resolve, reject) => { + const server = proxy(http.createServer()) + server.listen(0, '127.0.0.1', () => { + resolve(server) + }) + }) +} + +function createSecureProxy () { + return new Promise((resolve, reject) => { + const server = proxy(https.createServer(ssl)) + server.listen(0, '127.0.0.1', () => { + resolve(server) + }) + }) +} + +function createServer (handler, callback) { + return new Promise((resolve, reject) => { + const server = http.createServer() + server.listen(0, '127.0.0.1', () => { + resolve(server) + }) + }) +} + +function createSecureServer (handler, callback) { + return new Promise((resolve, reject) => { + const server = https.createServer(ssl) + server.listen(0, '127.0.0.1', () => { + resolve(server) + }) + }) +} + +module.exports = { + ssl, + createProxy, + createSecureProxy, + createServer, + createSecureServer +} diff --git a/test/utils/index.js b/test/utils/index.js index b6b189ccd..ac513fde9 100644 --- a/test/utils/index.js +++ b/test/utils/index.js @@ -23,6 +23,7 @@ const { promisify } = require('util') const sleep = promisify(setTimeout) const buildServer = require('./buildServer') const buildCluster = require('./buildCluster') +const buildProxy = require('./buildProxy') const connection = require('./MockConnection') async function waitCluster (client, waitForStatus = 'green', timeout = '50s', times = 0) { @@ -43,6 +44,7 @@ async function waitCluster (client, waitForStatus = 'green', timeout = '50s', ti module.exports = { buildServer, buildCluster, + buildProxy, connection, waitCluster } From e6f1b645a2b41b3845dadafccbf7d058f792450a Mon Sep 17 00:00:00 2001 From: Tomas Della Vedova Date: Mon, 3 Aug 2020 11:45:48 +0200 Subject: [PATCH 3/8] Generate response type as boolean if the request is HEAD only (#1275) --- scripts/utils/generateMain.js | 89 +++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 36 deletions(-) diff --git a/scripts/utils/generateMain.js b/scripts/utils/generateMain.js index 8e99d40c7..c6b721675 100644 --- a/scripts/utils/generateMain.js +++ b/scripts/utils/generateMain.js @@ -50,8 +50,10 @@ function genFactory (folder, paths) { .split('.') .reverse() .reduce((acc, val) => { - const body = hasBody(paths, file.slice(0, -3)) - const methods = acc === null ? buildMethodDefinition({ kibana: false }, val, name, body) : null + const spec = readSpec(paths, file.slice(0, -3)) + const isHead = isHeadMethod(spec, file.slice(0, -3)) + const body = hasBody(spec, file.slice(0, -3)) + const methods = acc === null ? buildMethodDefinition({ kibana: false }, val, name, body, isHead) : null const obj = {} if (methods) { for (const m of methods) { @@ -80,8 +82,10 @@ function genFactory (folder, paths) { .split('.') .reverse() .reduce((acc, val) => { - const body = hasBody(paths, file.slice(0, -3)) - const methods = acc === null ? buildMethodDefinition({ kibana: true }, val, name, body) : null + const spec = readSpec(paths, file.slice(0, -3)) + const isHead = isHeadMethod(spec, file.slice(0, -3)) + const body = hasBody(spec, file.slice(0, -3)) + const methods = acc === null ? buildMethodDefinition({ kibana: true }, val, name, body, isHead) : null const obj = {} if (methods) { for (const m of methods) { @@ -246,73 +250,86 @@ function toPascalCase (str) { return str[0].toUpperCase() + str.slice(1) } -function buildMethodDefinition (opts, api, name, hasBody) { +function buildMethodDefinition (opts, api, name, hasBody, isHead) { const Name = toPascalCase(name) const bodyType = ndjsonApiKey.includes(Name) ? 'RequestNDBody' : 'RequestBody' + const responseType = isHead ? 'boolean' : 'Record' const defaultBodyType = ndjsonApiKey.includes(Name) ? 'Record[]' : 'Record' if (opts.kibana) { if (hasBody) { return [ - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' } + { key: `${camelify(api)}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` } ] } else { return [ - { key: `${camelify(api)}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' } + { key: `${camelify(api)}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` } ] } } if (hasBody) { let methods = [ - { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' }, - { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(callback: callbackFn)`, val: 'TransportRequestCallback' }, - { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: 'TransportRequestCallback' }, - { key: `${api}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: 'TransportRequestCallback' } + { key: `${api}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` }, + { key: `${api}(callback: callbackFn)`, val: `TransportRequestCallback` }, + { key: `${api}(params: RequestParams.${Name}, callback: callbackFn)`, val: `TransportRequestCallback` }, + { key: `${api}(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: `TransportRequestCallback` } ] if (isSnakeCased(api)) { methods = methods.concat([ - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' }, - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(callback: callbackFn)`, val: 'TransportRequestCallback' }, - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: 'TransportRequestCallback' }, - { key: `${camelify(api)}, TRequestBody extends ${bodyType} = ${defaultBodyType}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: 'TransportRequestCallback' } + { key: `${camelify(api)}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` }, + { key: `${camelify(api)}(callback: callbackFn)`, val: `TransportRequestCallback` }, + { key: `${camelify(api)}(params: RequestParams.${Name}, callback: callbackFn)`, val: `TransportRequestCallback` }, + { key: `${camelify(api)}(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: `TransportRequestCallback` } ]) } return methods } else { let methods = [ - { key: `${api}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' }, - { key: `${api}, TContext = Context>(callback: callbackFn)`, val: 'TransportRequestCallback' }, - { key: `${api}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: 'TransportRequestCallback' }, - { key: `${api}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: 'TransportRequestCallback' } + { key: `${api}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` }, + { key: `${api}(callback: callbackFn)`, val: `TransportRequestCallback` }, + { key: `${api}(params: RequestParams.${Name}, callback: callbackFn)`, val: `TransportRequestCallback` }, + { key: `${api}(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: `TransportRequestCallback` } ] if (isSnakeCased(api)) { methods = methods.concat([ - { key: `${camelify(api)}, TContext = Context>(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: 'TransportRequestPromise>' }, - { key: `${camelify(api)}, TContext = Context>(callback: callbackFn)`, val: 'TransportRequestCallback' }, - { key: `${camelify(api)}, TContext = Context>(params: RequestParams.${Name}, callback: callbackFn)`, val: 'TransportRequestCallback' }, - { key: `${camelify(api)}, TContext = Context>(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: 'TransportRequestCallback' } + { key: `${camelify(api)}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, val: `TransportRequestPromise>` }, + { key: `${camelify(api)}(callback: callbackFn)`, val: `TransportRequestCallback` }, + { key: `${camelify(api)}(params: RequestParams.${Name}, callback: callbackFn)`, val: `TransportRequestCallback` }, + { key: `${camelify(api)}(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, val: `TransportRequestCallback` } ]) } return methods } } -function hasBody (paths, file) { - const spec = readSpec() - return !!spec[file].body +function hasBody (spec, api) { + return !!spec[api].body +} - function readSpec () { - try { - return require(join(paths[0], file)) - } catch (err) {} - - try { - return require(join(paths[1], file)) - } catch (err) {} - - throw new Error(`Cannot read spec file ${file}`) +function isHeadMethod (spec, api) { + const { paths } = spec[api].url + const methods = [] + for (const path of paths) { + for (const method of path.methods) { + if (!methods.includes(method)) { + methods.push(method) + } + } } + return methods.length === 1 && methods[0] === 'HEAD' +} + +function readSpec (paths, file) { + try { + return require(join(paths[0], file)) + } catch (err) {} + + try { + return require(join(paths[1], file)) + } catch (err) {} + + throw new Error(`Cannot read spec file ${file}`) } module.exports = genFactory From 573b29777c5b5dc5301c1e3892299f2745176dc8 Mon Sep 17 00:00:00 2001 From: delvedor Date: Mon, 3 Aug 2020 12:00:49 +0200 Subject: [PATCH 4/8] API generation --- api/api/async_search.delete.js | 2 +- api/api/async_search.get.js | 2 +- .../autoscaling.delete_autoscaling_policy.js | 2 +- api/api/autoscaling.get_autoscaling_policy.js | 2 +- api/api/autoscaling.put_autoscaling_policy.js | 4 +- api/api/bulk.js | 4 +- api/api/ccr.delete_auto_follow_pattern.js | 2 +- api/api/ccr.follow.js | 4 +- api/api/ccr.follow_info.js | 2 +- api/api/ccr.follow_stats.js | 2 +- api/api/ccr.forget_follower.js | 4 +- api/api/ccr.pause_auto_follow_pattern.js | 2 +- api/api/ccr.pause_follow.js | 2 +- api/api/ccr.put_auto_follow_pattern.js | 4 +- api/api/ccr.resume_auto_follow_pattern.js | 2 +- api/api/ccr.resume_follow.js | 2 +- api/api/ccr.unfollow.js | 2 +- api/api/clear_scroll.js | 2 +- api/api/cluster.delete_component_template.js | 2 +- api/api/cluster.exists_component_template.js | 2 +- api/api/cluster.put_component_template.js | 4 +- api/api/cluster.put_settings.js | 2 +- api/api/cluster.state.js | 2 +- api/api/count.js | 2 +- api/api/create.js | 6 +- .../dangling_indices.delete_dangling_index.js | 2 +- .../dangling_indices.import_dangling_index.js | 2 +- api/api/delete.js | 4 +- api/api/delete_by_query.js | 6 +- api/api/delete_by_query_rethrottle.js | 4 +- api/api/delete_script.js | 2 +- api/api/enrich.delete_policy.js | 2 +- api/api/enrich.execute_policy.js | 2 +- api/api/enrich.put_policy.js | 4 +- api/api/eql.delete.js | 2 +- api/api/eql.get.js | 2 +- api/api/eql.search.js | 4 +- api/api/exists.js | 4 +- api/api/exists_source.js | 8 +- api/api/explain.js | 4 +- api/api/get.js | 4 +- api/api/get_script.js | 2 +- api/api/get_source.js | 4 +- api/api/graph.explore.js | 4 +- api/api/ilm.delete_lifecycle.js | 2 +- api/api/ilm.explain_lifecycle.js | 2 +- api/api/ilm.move_to_step.js | 2 +- api/api/ilm.put_lifecycle.js | 2 +- api/api/ilm.remove_policy.js | 2 +- api/api/ilm.retry.js | 2 +- api/api/index.js | 4 +- api/api/indices.add_block.js | 6 +- api/api/indices.clone.js | 6 +- api/api/indices.close.js | 2 +- api/api/indices.create.js | 2 +- api/api/indices.create_data_stream.js | 11 +- api/api/indices.data_streams_stats.js | 13 +- api/api/indices.delete.js | 2 +- api/api/indices.delete_alias.js | 6 +- api/api/indices.delete_data_stream.js | 11 +- api/api/indices.delete_index_template.js | 2 +- api/api/indices.delete_template.js | 2 +- api/api/indices.exists.js | 2 +- api/api/indices.exists_alias.js | 2 +- api/api/indices.exists_index_template.js | 2 +- api/api/indices.exists_template.js | 2 +- api/api/indices.exists_type.js | 6 +- api/api/indices.freeze.js | 2 +- api/api/indices.get.js | 2 +- api/api/indices.get_data_stream.js | 9 +- api/api/indices.get_field_mapping.js | 2 +- api/api/indices.open.js | 2 +- api/api/indices.put_alias.js | 6 +- api/api/indices.put_index_template.js | 4 +- api/api/indices.put_mapping.js | 2 +- api/api/indices.put_settings.js | 2 +- api/api/indices.put_template.js | 4 +- api/api/indices.reload_search_analyzers.js | 2 +- api/api/indices.resolve_index.js | 2 +- api/api/indices.rollover.js | 4 +- api/api/indices.shrink.js | 6 +- api/api/indices.simulate_index_template.js | 2 +- api/api/indices.split.js | 6 +- api/api/indices.unfreeze.js | 2 +- api/api/indices.update_aliases.js | 2 +- api/api/indices.validate_query.js | 2 +- api/api/ingest.delete_pipeline.js | 2 +- api/api/ingest.put_pipeline.js | 4 +- api/api/ingest.simulate.js | 2 +- api/api/mget.js | 4 +- api/api/ml.close_job.js | 2 +- api/api/ml.delete_calendar.js | 2 +- api/api/ml.delete_calendar_event.js | 6 +- api/api/ml.delete_calendar_job.js | 6 +- api/api/ml.delete_data_frame_analytics.js | 2 +- api/api/ml.delete_datafeed.js | 2 +- api/api/ml.delete_filter.js | 2 +- api/api/ml.delete_forecast.js | 4 +- api/api/ml.delete_job.js | 2 +- api/api/ml.delete_model_snapshot.js | 6 +- api/api/ml.delete_trained_model.js | 2 +- api/api/ml.estimate_model_memory.js | 2 +- api/api/ml.evaluate_data_frame.js | 2 +- api/api/ml.find_file_structure.js | 2 +- api/api/ml.flush_job.js | 2 +- api/api/ml.forecast.js | 2 +- api/api/ml.get_buckets.js | 4 +- api/api/ml.get_calendar_events.js | 2 +- api/api/ml.get_categories.js | 4 +- api/api/ml.get_influencers.js | 2 +- api/api/ml.get_model_snapshots.js | 4 +- api/api/ml.get_overall_buckets.js | 2 +- api/api/ml.get_records.js | 2 +- api/api/ml.open_job.js | 2 +- api/api/ml.post_calendar_events.js | 4 +- api/api/ml.post_data.js | 4 +- api/api/ml.preview_datafeed.js | 2 +- api/api/ml.put_calendar.js | 2 +- api/api/ml.put_calendar_job.js | 6 +- api/api/ml.put_data_frame_analytics.js | 4 +- api/api/ml.put_datafeed.js | 4 +- api/api/ml.put_filter.js | 4 +- api/api/ml.put_job.js | 4 +- api/api/ml.put_trained_model.js | 4 +- api/api/ml.revert_model_snapshot.js | 6 +- api/api/ml.start_data_frame_analytics.js | 2 +- api/api/ml.start_datafeed.js | 2 +- api/api/ml.stop_data_frame_analytics.js | 2 +- api/api/ml.stop_datafeed.js | 2 +- api/api/ml.update_data_frame_analytics.js | 4 +- api/api/ml.update_datafeed.js | 4 +- api/api/ml.update_filter.js | 4 +- api/api/ml.update_job.js | 4 +- api/api/ml.update_model_snapshot.js | 8 +- api/api/ml.validate.js | 2 +- api/api/ml.validate_detector.js | 2 +- api/api/monitoring.bulk.js | 2 +- api/api/msearch.js | 4 +- api/api/msearch_template.js | 4 +- api/api/mtermvectors.js | 2 +- api/api/put_script.js | 6 +- api/api/rank_eval.js | 2 +- api/api/reindex.js | 2 +- api/api/reindex_rethrottle.js | 4 +- api/api/rollup.delete_job.js | 2 +- api/api/rollup.get_rollup_index_caps.js | 2 +- api/api/rollup.put_job.js | 4 +- api/api/rollup.rollup_search.js | 6 +- api/api/rollup.start_job.js | 2 +- api/api/rollup.stop_job.js | 2 +- api/api/search.js | 2 +- api/api/search_template.js | 4 +- api/api/searchable_snapshots.mount.js | 8 +- .../searchable_snapshots.repository_stats.js | 2 +- api/api/security.change_password.js | 2 +- api/api/security.clear_cached_privileges.js | 2 +- api/api/security.clear_cached_realms.js | 2 +- api/api/security.clear_cached_roles.js | 2 +- api/api/security.create_api_key.js | 2 +- api/api/security.delete_privileges.js | 6 +- api/api/security.delete_role.js | 2 +- api/api/security.delete_role_mapping.js | 2 +- api/api/security.delete_user.js | 2 +- api/api/security.disable_user.js | 2 +- api/api/security.enable_user.js | 2 +- api/api/security.get_privileges.js | 2 +- api/api/security.get_token.js | 2 +- api/api/security.has_privileges.js | 2 +- api/api/security.invalidate_api_key.js | 2 +- api/api/security.invalidate_token.js | 2 +- api/api/security.put_privileges.js | 2 +- api/api/security.put_role.js | 4 +- api/api/security.put_role_mapping.js | 4 +- api/api/security.put_user.js | 4 +- api/api/slm.delete_lifecycle.js | 2 +- api/api/slm.execute_lifecycle.js | 2 +- api/api/slm.put_lifecycle.js | 2 +- api/api/snapshot.cleanup_repository.js | 2 +- api/api/snapshot.create.js | 6 +- api/api/snapshot.create_repository.js | 4 +- api/api/snapshot.delete.js | 6 +- api/api/snapshot.delete_repository.js | 2 +- api/api/snapshot.get.js | 6 +- api/api/snapshot.restore.js | 6 +- api/api/snapshot.status.js | 2 +- api/api/snapshot.verify_repository.js | 2 +- api/api/sql.clear_cursor.js | 2 +- api/api/sql.query.js | 2 +- api/api/sql.translate.js | 2 +- api/api/tasks.get.js | 2 +- api/api/termvectors.js | 2 +- api/api/transform.delete_transform.js | 2 +- api/api/transform.get_transform_stats.js | 2 +- api/api/transform.preview_transform.js | 2 +- api/api/transform.put_transform.js | 4 +- api/api/transform.start_transform.js | 2 +- api/api/transform.stop_transform.js | 2 +- api/api/transform.update_transform.js | 4 +- api/api/update.js | 6 +- api/api/update_by_query.js | 4 +- api/api/update_by_query_rethrottle.js | 4 +- api/api/watcher.ack_watch.js | 4 +- api/api/watcher.activate_watch.js | 2 +- api/api/watcher.deactivate_watch.js | 2 +- api/api/watcher.delete_watch.js | 2 +- api/api/watcher.get_watch.js | 2 +- api/api/watcher.put_watch.js | 2 +- api/kibana.d.ts | 18 +-- api/requestParams.d.ts | 36 ++--- docs/reference.asciidoc | 148 ++++++++---------- index.d.ts | 120 +++++++------- 211 files changed, 471 insertions(+), 507 deletions(-) diff --git a/api/api/async_search.delete.js b/api/api/async_search.delete.js index f2f24cd0a..a77f1f60d 100644 --- a/api/api/async_search.delete.js +++ b/api/api/async_search.delete.js @@ -52,7 +52,7 @@ function buildAsyncSearchDelete (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/async_search.get.js b/api/api/async_search.get.js index 9a68f5552..163b0aa9f 100644 --- a/api/api/async_search.get.js +++ b/api/api/async_search.get.js @@ -56,7 +56,7 @@ function buildAsyncSearchGet (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/autoscaling.delete_autoscaling_policy.js b/api/api/autoscaling.delete_autoscaling_policy.js index b0e8936da..f0382f1ae 100644 --- a/api/api/autoscaling.delete_autoscaling_policy.js +++ b/api/api/autoscaling.delete_autoscaling_policy.js @@ -52,7 +52,7 @@ function buildAutoscalingDeleteAutoscalingPolicy (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/autoscaling.get_autoscaling_policy.js b/api/api/autoscaling.get_autoscaling_policy.js index 8300ead29..296ea919f 100644 --- a/api/api/autoscaling.get_autoscaling_policy.js +++ b/api/api/autoscaling.get_autoscaling_policy.js @@ -52,7 +52,7 @@ function buildAutoscalingGetAutoscalingPolicy (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/autoscaling.put_autoscaling_policy.js b/api/api/autoscaling.put_autoscaling_policy.js index cc57bdad8..f1eee7247 100644 --- a/api/api/autoscaling.put_autoscaling_policy.js +++ b/api/api/autoscaling.put_autoscaling_policy.js @@ -52,11 +52,11 @@ function buildAutoscalingPutAutoscalingPolicy (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/bulk.js b/api/api/bulk.js index 50f2504b0..100f3e9c0 100644 --- a/api/api/bulk.js +++ b/api/api/bulk.js @@ -71,13 +71,13 @@ function buildBulk (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/ccr.delete_auto_follow_pattern.js b/api/api/ccr.delete_auto_follow_pattern.js index 76f433b03..b5e2e9a58 100644 --- a/api/api/ccr.delete_auto_follow_pattern.js +++ b/api/api/ccr.delete_auto_follow_pattern.js @@ -52,7 +52,7 @@ function buildCcrDeleteAutoFollowPattern (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/ccr.follow.js b/api/api/ccr.follow.js index 7d957c691..cdc66214c 100644 --- a/api/api/ccr.follow.js +++ b/api/api/ccr.follow.js @@ -52,11 +52,11 @@ function buildCcrFollow (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ccr.follow_info.js b/api/api/ccr.follow_info.js index e710b29d8..fb908d8b7 100644 --- a/api/api/ccr.follow_info.js +++ b/api/api/ccr.follow_info.js @@ -52,7 +52,7 @@ function buildCcrFollowInfo (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ccr.follow_stats.js b/api/api/ccr.follow_stats.js index c02e6a576..7d94cb406 100644 --- a/api/api/ccr.follow_stats.js +++ b/api/api/ccr.follow_stats.js @@ -52,7 +52,7 @@ function buildCcrFollowStats (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ccr.forget_follower.js b/api/api/ccr.forget_follower.js index aa5a9a7ef..14679003e 100644 --- a/api/api/ccr.forget_follower.js +++ b/api/api/ccr.forget_follower.js @@ -52,11 +52,11 @@ function buildCcrForgetFollower (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ccr.pause_auto_follow_pattern.js b/api/api/ccr.pause_auto_follow_pattern.js index c7f61bb23..02e4cdc18 100644 --- a/api/api/ccr.pause_auto_follow_pattern.js +++ b/api/api/ccr.pause_auto_follow_pattern.js @@ -52,7 +52,7 @@ function buildCcrPauseAutoFollowPattern (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/ccr.pause_follow.js b/api/api/ccr.pause_follow.js index 2a490ba05..3f3b3d5a3 100644 --- a/api/api/ccr.pause_follow.js +++ b/api/api/ccr.pause_follow.js @@ -52,7 +52,7 @@ function buildCcrPauseFollow (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ccr.put_auto_follow_pattern.js b/api/api/ccr.put_auto_follow_pattern.js index 561e9f086..62b951c5c 100644 --- a/api/api/ccr.put_auto_follow_pattern.js +++ b/api/api/ccr.put_auto_follow_pattern.js @@ -52,11 +52,11 @@ function buildCcrPutAutoFollowPattern (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ccr.resume_auto_follow_pattern.js b/api/api/ccr.resume_auto_follow_pattern.js index e8b23a3a9..2e75f9efa 100644 --- a/api/api/ccr.resume_auto_follow_pattern.js +++ b/api/api/ccr.resume_auto_follow_pattern.js @@ -52,7 +52,7 @@ function buildCcrResumeAutoFollowPattern (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/ccr.resume_follow.js b/api/api/ccr.resume_follow.js index 1360af9c3..02c2879b7 100644 --- a/api/api/ccr.resume_follow.js +++ b/api/api/ccr.resume_follow.js @@ -52,7 +52,7 @@ function buildCcrResumeFollow (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ccr.unfollow.js b/api/api/ccr.unfollow.js index 36dea601e..90402d5a4 100644 --- a/api/api/ccr.unfollow.js +++ b/api/api/ccr.unfollow.js @@ -52,7 +52,7 @@ function buildCcrUnfollow (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/clear_scroll.js b/api/api/clear_scroll.js index 285b0a646..4aa43e5b8 100644 --- a/api/api/clear_scroll.js +++ b/api/api/clear_scroll.js @@ -42,7 +42,7 @@ function buildClearScroll (opts) { /** * Perform a clear_scroll request * Explicitly clears the search context for a scroll. - * https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api + * https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html */ return function clearScroll (params, options, callback) { options = options || {} diff --git a/api/api/cluster.delete_component_template.js b/api/api/cluster.delete_component_template.js index 1c9c5dbfa..fe7dc4a72 100644 --- a/api/api/cluster.delete_component_template.js +++ b/api/api/cluster.delete_component_template.js @@ -60,7 +60,7 @@ function buildClusterDeleteComponentTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/cluster.exists_component_template.js b/api/api/cluster.exists_component_template.js index b11743513..3ce4c5acc 100644 --- a/api/api/cluster.exists_component_template.js +++ b/api/api/cluster.exists_component_template.js @@ -60,7 +60,7 @@ function buildClusterExistsComponentTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/cluster.put_component_template.js b/api/api/cluster.put_component_template.js index bd087daad..4a1c59943 100644 --- a/api/api/cluster.put_component_template.js +++ b/api/api/cluster.put_component_template.js @@ -61,11 +61,11 @@ function buildClusterPutComponentTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/cluster.put_settings.js b/api/api/cluster.put_settings.js index d1c688163..77dc77195 100644 --- a/api/api/cluster.put_settings.js +++ b/api/api/cluster.put_settings.js @@ -62,7 +62,7 @@ function buildClusterPutSettings (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/cluster.state.js b/api/api/cluster.state.js index f3380ae4d..7c80d9f3f 100644 --- a/api/api/cluster.state.js +++ b/api/api/cluster.state.js @@ -72,7 +72,7 @@ function buildClusterState (opts) { } // check required url components - if (params.index != null && (params.metric == null)) { + if (params['index'] != null && (params['metric'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: metric') return handleError(err, callback) } diff --git a/api/api/count.js b/api/api/count.js index 045eb1dbc..8413e0240 100644 --- a/api/api/count.js +++ b/api/api/count.js @@ -79,7 +79,7 @@ function buildCount (opts) { } // check required url components - if (params.type != null && (params.index == null)) { + if (params['type'] != null && (params['index'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/create.js b/api/api/create.js index d565b2963..0747a5791 100644 --- a/api/api/create.js +++ b/api/api/create.js @@ -68,15 +68,15 @@ Returns a 409 response when a document with a same ID already exists in the inde } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/dangling_indices.delete_dangling_index.js b/api/api/dangling_indices.delete_dangling_index.js index 013a695f8..d836f0ed1 100644 --- a/api/api/dangling_indices.delete_dangling_index.js +++ b/api/api/dangling_indices.delete_dangling_index.js @@ -62,7 +62,7 @@ function buildDanglingIndicesDeleteDanglingIndex (opts) { } // check required parameters - if (params.index_uuid == null && params.indexUuid == null) { + if (params['index_uuid'] == null && params['indexUuid'] == null) { const err = new ConfigurationError('Missing required parameter: index_uuid or indexUuid') return handleError(err, callback) } diff --git a/api/api/dangling_indices.import_dangling_index.js b/api/api/dangling_indices.import_dangling_index.js index f84a714be..f60153af7 100644 --- a/api/api/dangling_indices.import_dangling_index.js +++ b/api/api/dangling_indices.import_dangling_index.js @@ -62,7 +62,7 @@ function buildDanglingIndicesImportDanglingIndex (opts) { } // check required parameters - if (params.index_uuid == null && params.indexUuid == null) { + if (params['index_uuid'] == null && params['indexUuid'] == null) { const err = new ConfigurationError('Missing required parameter: index_uuid or indexUuid') return handleError(err, callback) } diff --git a/api/api/delete.js b/api/api/delete.js index 72dd35909..cbf5394bb 100644 --- a/api/api/delete.js +++ b/api/api/delete.js @@ -69,11 +69,11 @@ function buildDelete (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js index d13d3b4df..db5a12878 100644 --- a/api/api/delete_by_query.js +++ b/api/api/delete_by_query.js @@ -106,17 +106,17 @@ function buildDeleteByQuery (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/delete_by_query_rethrottle.js b/api/api/delete_by_query_rethrottle.js index 9932d3ba2..47e60e5cd 100644 --- a/api/api/delete_by_query_rethrottle.js +++ b/api/api/delete_by_query_rethrottle.js @@ -59,11 +59,11 @@ function buildDeleteByQueryRethrottle (opts) { } // check required parameters - if (params.task_id == null && params.taskId == null) { + if (params['task_id'] == null && params['taskId'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond') return handleError(err, callback) } diff --git a/api/api/delete_script.js b/api/api/delete_script.js index f1b295074..b43a1ba9e 100644 --- a/api/api/delete_script.js +++ b/api/api/delete_script.js @@ -60,7 +60,7 @@ function buildDeleteScript (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/enrich.delete_policy.js b/api/api/enrich.delete_policy.js index ff39119ac..d86754473 100644 --- a/api/api/enrich.delete_policy.js +++ b/api/api/enrich.delete_policy.js @@ -52,7 +52,7 @@ function buildEnrichDeletePolicy (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/enrich.execute_policy.js b/api/api/enrich.execute_policy.js index 0aabbe306..eb0add6e8 100644 --- a/api/api/enrich.execute_policy.js +++ b/api/api/enrich.execute_policy.js @@ -52,7 +52,7 @@ function buildEnrichExecutePolicy (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/enrich.put_policy.js b/api/api/enrich.put_policy.js index 1af03fde8..f4e92f9e1 100644 --- a/api/api/enrich.put_policy.js +++ b/api/api/enrich.put_policy.js @@ -52,11 +52,11 @@ function buildEnrichPutPolicy (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/eql.delete.js b/api/api/eql.delete.js index af5b073f1..b4dc508b5 100644 --- a/api/api/eql.delete.js +++ b/api/api/eql.delete.js @@ -52,7 +52,7 @@ function buildEqlDelete (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/eql.get.js b/api/api/eql.get.js index 2bf3b6789..65e97dbe8 100644 --- a/api/api/eql.get.js +++ b/api/api/eql.get.js @@ -54,7 +54,7 @@ function buildEqlGet (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/eql.search.js b/api/api/eql.search.js index 813bd7b67..007a08612 100644 --- a/api/api/eql.search.js +++ b/api/api/eql.search.js @@ -56,11 +56,11 @@ function buildEqlSearch (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/exists.js b/api/api/exists.js index 81a1657e8..79768379e 100644 --- a/api/api/exists.js +++ b/api/api/exists.js @@ -71,11 +71,11 @@ function buildExists (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/exists_source.js b/api/api/exists_source.js index 1469187ad..a70e0c20a 100644 --- a/api/api/exists_source.js +++ b/api/api/exists_source.js @@ -69,20 +69,20 @@ function buildExistsSource (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/explain.js b/api/api/explain.js index 023faa86f..25882744b 100644 --- a/api/api/explain.js +++ b/api/api/explain.js @@ -74,11 +74,11 @@ function buildExplain (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/get.js b/api/api/get.js index 41c53993d..980cd34a4 100644 --- a/api/api/get.js +++ b/api/api/get.js @@ -71,11 +71,11 @@ function buildGet (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/get_script.js b/api/api/get_script.js index ab8f6cfe9..363d5799e 100644 --- a/api/api/get_script.js +++ b/api/api/get_script.js @@ -59,7 +59,7 @@ function buildGetScript (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/get_source.js b/api/api/get_source.js index 3e6da777a..5661c4502 100644 --- a/api/api/get_source.js +++ b/api/api/get_source.js @@ -69,11 +69,11 @@ function buildGetSource (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/graph.explore.js b/api/api/graph.explore.js index b6c36fe75..57860d84d 100644 --- a/api/api/graph.explore.js +++ b/api/api/graph.explore.js @@ -53,13 +53,13 @@ function buildGraphExplore (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/ilm.delete_lifecycle.js b/api/api/ilm.delete_lifecycle.js index c36edaacb..c23004d7e 100644 --- a/api/api/ilm.delete_lifecycle.js +++ b/api/api/ilm.delete_lifecycle.js @@ -52,7 +52,7 @@ function buildIlmDeleteLifecycle (opts) { } // check required parameters - if (params.policy == null) { + if (params['policy'] == null) { const err = new ConfigurationError('Missing required parameter: policy') return handleError(err, callback) } diff --git a/api/api/ilm.explain_lifecycle.js b/api/api/ilm.explain_lifecycle.js index 0e7451db1..e8b7b144f 100644 --- a/api/api/ilm.explain_lifecycle.js +++ b/api/api/ilm.explain_lifecycle.js @@ -54,7 +54,7 @@ function buildIlmExplainLifecycle (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ilm.move_to_step.js b/api/api/ilm.move_to_step.js index e0871af7c..946d2bae9 100644 --- a/api/api/ilm.move_to_step.js +++ b/api/api/ilm.move_to_step.js @@ -52,7 +52,7 @@ function buildIlmMoveToStep (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ilm.put_lifecycle.js b/api/api/ilm.put_lifecycle.js index 38f238188..e3885c69f 100644 --- a/api/api/ilm.put_lifecycle.js +++ b/api/api/ilm.put_lifecycle.js @@ -52,7 +52,7 @@ function buildIlmPutLifecycle (opts) { } // check required parameters - if (params.policy == null) { + if (params['policy'] == null) { const err = new ConfigurationError('Missing required parameter: policy') return handleError(err, callback) } diff --git a/api/api/ilm.remove_policy.js b/api/api/ilm.remove_policy.js index 18d75a3f0..c6696d588 100644 --- a/api/api/ilm.remove_policy.js +++ b/api/api/ilm.remove_policy.js @@ -52,7 +52,7 @@ function buildIlmRemovePolicy (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/ilm.retry.js b/api/api/ilm.retry.js index 691fb210c..76f4b9914 100644 --- a/api/api/ilm.retry.js +++ b/api/api/ilm.retry.js @@ -52,7 +52,7 @@ function buildIlmRetry (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/index.js b/api/api/index.js index bf4e0a17b..8daec8383 100644 --- a/api/api/index.js +++ b/api/api/index.js @@ -74,11 +74,11 @@ function buildIndex (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.add_block.js b/api/api/indices.add_block.js index 734021cb6..32f9fa9d2 100644 --- a/api/api/indices.add_block.js +++ b/api/api/indices.add_block.js @@ -66,17 +66,17 @@ function buildIndicesAddBlock (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.block == null) { + if (params['block'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.clone.js b/api/api/indices.clone.js index c57b42951..f8c4ba04f 100644 --- a/api/api/indices.clone.js +++ b/api/api/indices.clone.js @@ -62,17 +62,17 @@ function buildIndicesClone (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.target == null) { + if (params['target'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.close.js b/api/api/indices.close.js index dc9f45a7c..0c08d65fa 100644 --- a/api/api/indices.close.js +++ b/api/api/indices.close.js @@ -68,7 +68,7 @@ function buildIndicesClose (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.create.js b/api/api/indices.create.js index 9ecc7f8e0..b234a3055 100644 --- a/api/api/indices.create.js +++ b/api/api/indices.create.js @@ -64,7 +64,7 @@ function buildIndicesCreate (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.create_data_stream.js b/api/api/indices.create_data_stream.js index 98ff056a2..ed319d7dd 100644 --- a/api/api/indices.create_data_stream.js +++ b/api/api/indices.create_data_stream.js @@ -27,16 +27,11 @@ function buildIndicesCreateDataStream (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path' + ] const snakeCase = { - errorTrace: 'error_trace', - filterPath: 'filter_path' + } /** @@ -57,7 +52,7 @@ function buildIndicesCreateDataStream (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.data_streams_stats.js b/api/api/indices.data_streams_stats.js index 5fbc7c20e..364312829 100644 --- a/api/api/indices.data_streams_stats.js +++ b/api/api/indices.data_streams_stats.js @@ -27,20 +27,11 @@ function buildIndicesDataStreamsStats (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ - 'expand_wildcards', - 'forbid_closed_indices', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path' + ] const snakeCase = { - expandWildcards: 'expand_wildcards', - forbidClosedIndices: 'forbid_closed_indices', - errorTrace: 'error_trace', - filterPath: 'filter_path' + } /** diff --git a/api/api/indices.delete.js b/api/api/indices.delete.js index 731529cf1..6447b3c7f 100644 --- a/api/api/indices.delete.js +++ b/api/api/indices.delete.js @@ -66,7 +66,7 @@ function buildIndicesDelete (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.delete_alias.js b/api/api/indices.delete_alias.js index df6565a92..2a3bbe34f 100644 --- a/api/api/indices.delete_alias.js +++ b/api/api/indices.delete_alias.js @@ -60,17 +60,17 @@ function buildIndicesDeleteAlias (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.delete_data_stream.js b/api/api/indices.delete_data_stream.js index 410e0fed8..1910544b6 100644 --- a/api/api/indices.delete_data_stream.js +++ b/api/api/indices.delete_data_stream.js @@ -27,16 +27,11 @@ function buildIndicesDeleteDataStream (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path' + ] const snakeCase = { - errorTrace: 'error_trace', - filterPath: 'filter_path' + } /** @@ -57,7 +52,7 @@ function buildIndicesDeleteDataStream (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.delete_index_template.js b/api/api/indices.delete_index_template.js index 8ca1b846d..a07bf8365 100644 --- a/api/api/indices.delete_index_template.js +++ b/api/api/indices.delete_index_template.js @@ -60,7 +60,7 @@ function buildIndicesDeleteIndexTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.delete_template.js b/api/api/indices.delete_template.js index 014fa02e0..aa8976e0f 100644 --- a/api/api/indices.delete_template.js +++ b/api/api/indices.delete_template.js @@ -60,7 +60,7 @@ function buildIndicesDeleteTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.exists.js b/api/api/indices.exists.js index 71b0260e4..2f4826d3e 100644 --- a/api/api/indices.exists.js +++ b/api/api/indices.exists.js @@ -68,7 +68,7 @@ function buildIndicesExists (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.exists_alias.js b/api/api/indices.exists_alias.js index 49f6bc50b..a10e91168 100644 --- a/api/api/indices.exists_alias.js +++ b/api/api/indices.exists_alias.js @@ -64,7 +64,7 @@ function buildIndicesExistsAlias (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.exists_index_template.js b/api/api/indices.exists_index_template.js index 0d6d541f0..97b474ab3 100644 --- a/api/api/indices.exists_index_template.js +++ b/api/api/indices.exists_index_template.js @@ -62,7 +62,7 @@ function buildIndicesExistsIndexTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.exists_template.js b/api/api/indices.exists_template.js index 04c44e40d..beea46706 100644 --- a/api/api/indices.exists_template.js +++ b/api/api/indices.exists_template.js @@ -62,7 +62,7 @@ function buildIndicesExistsTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.exists_type.js b/api/api/indices.exists_type.js index f6461de62..6cadd760c 100644 --- a/api/api/indices.exists_type.js +++ b/api/api/indices.exists_type.js @@ -64,17 +64,17 @@ function buildIndicesExistsType (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.type == null) { + if (params['type'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.freeze.js b/api/api/indices.freeze.js index 610013cae..d20f5e46e 100644 --- a/api/api/indices.freeze.js +++ b/api/api/indices.freeze.js @@ -61,7 +61,7 @@ function buildIndicesFreeze (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.get.js b/api/api/indices.get.js index b9700c260..4aef826c6 100644 --- a/api/api/indices.get.js +++ b/api/api/indices.get.js @@ -72,7 +72,7 @@ function buildIndicesGet (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.get_data_stream.js b/api/api/indices.get_data_stream.js index 41e9d9d2b..dc10d2b4b 100644 --- a/api/api/indices.get_data_stream.js +++ b/api/api/indices.get_data_stream.js @@ -27,16 +27,11 @@ function buildIndicesGetDataStream (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path' + ] const snakeCase = { - errorTrace: 'error_trace', - filterPath: 'filter_path' + } /** diff --git a/api/api/indices.get_field_mapping.js b/api/api/indices.get_field_mapping.js index 90c2e0d11..362d9e10f 100644 --- a/api/api/indices.get_field_mapping.js +++ b/api/api/indices.get_field_mapping.js @@ -68,7 +68,7 @@ function buildIndicesGetFieldMapping (opts) { } // check required parameters - if (params.fields == null) { + if (params['fields'] == null) { const err = new ConfigurationError('Missing required parameter: fields') return handleError(err, callback) } diff --git a/api/api/indices.open.js b/api/api/indices.open.js index 2137289ec..1dcf1f830 100644 --- a/api/api/indices.open.js +++ b/api/api/indices.open.js @@ -68,7 +68,7 @@ function buildIndicesOpen (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.put_alias.js b/api/api/indices.put_alias.js index 9e8e38315..36547da06 100644 --- a/api/api/indices.put_alias.js +++ b/api/api/indices.put_alias.js @@ -60,17 +60,17 @@ function buildIndicesPutAlias (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.put_index_template.js b/api/api/indices.put_index_template.js index 1f1e5af16..6a02d7396 100644 --- a/api/api/indices.put_index_template.js +++ b/api/api/indices.put_index_template.js @@ -61,11 +61,11 @@ function buildIndicesPutIndexTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.put_mapping.js b/api/api/indices.put_mapping.js index 7816bb53a..34d365dcf 100644 --- a/api/api/indices.put_mapping.js +++ b/api/api/indices.put_mapping.js @@ -70,7 +70,7 @@ function buildIndicesPutMapping (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.put_settings.js b/api/api/indices.put_settings.js index 7615a6c79..c2b579511 100644 --- a/api/api/indices.put_settings.js +++ b/api/api/indices.put_settings.js @@ -70,7 +70,7 @@ function buildIndicesPutSettings (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.put_template.js b/api/api/indices.put_template.js index 6e6cfad35..f6d2d8873 100644 --- a/api/api/indices.put_template.js +++ b/api/api/indices.put_template.js @@ -63,11 +63,11 @@ function buildIndicesPutTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.reload_search_analyzers.js b/api/api/indices.reload_search_analyzers.js index ad0616195..eb651ad11 100644 --- a/api/api/indices.reload_search_analyzers.js +++ b/api/api/indices.reload_search_analyzers.js @@ -56,7 +56,7 @@ function buildIndicesReloadSearchAnalyzers (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.resolve_index.js b/api/api/indices.resolve_index.js index a0e8222f9..db096a4db 100644 --- a/api/api/indices.resolve_index.js +++ b/api/api/indices.resolve_index.js @@ -59,7 +59,7 @@ function buildIndicesResolveIndex (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.rollover.js b/api/api/indices.rollover.js index 6d208b669..fe1da99ce 100644 --- a/api/api/indices.rollover.js +++ b/api/api/indices.rollover.js @@ -67,13 +67,13 @@ is considered to be too large or too old. } // check required parameters - if (params.alias == null) { + if (params['alias'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: alias') return handleError(err, callback) } diff --git a/api/api/indices.shrink.js b/api/api/indices.shrink.js index 08133f735..328805359 100644 --- a/api/api/indices.shrink.js +++ b/api/api/indices.shrink.js @@ -64,17 +64,17 @@ function buildIndicesShrink (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.target == null) { + if (params['target'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.simulate_index_template.js b/api/api/indices.simulate_index_template.js index e5e525547..fd303037b 100644 --- a/api/api/indices.simulate_index_template.js +++ b/api/api/indices.simulate_index_template.js @@ -61,7 +61,7 @@ function buildIndicesSimulateIndexTemplate (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/indices.split.js b/api/api/indices.split.js index 000f4d066..65a721177 100644 --- a/api/api/indices.split.js +++ b/api/api/indices.split.js @@ -64,17 +64,17 @@ function buildIndicesSplit (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.target == null) { + if (params['target'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/indices.unfreeze.js b/api/api/indices.unfreeze.js index 2a04c39aa..a57d2edda 100644 --- a/api/api/indices.unfreeze.js +++ b/api/api/indices.unfreeze.js @@ -61,7 +61,7 @@ function buildIndicesUnfreeze (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/indices.update_aliases.js b/api/api/indices.update_aliases.js index 70d70bc95..4903afe09 100644 --- a/api/api/indices.update_aliases.js +++ b/api/api/indices.update_aliases.js @@ -60,7 +60,7 @@ function buildIndicesUpdateAliases (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/indices.validate_query.js b/api/api/indices.validate_query.js index 4b6c8f428..753cee0b6 100644 --- a/api/api/indices.validate_query.js +++ b/api/api/indices.validate_query.js @@ -75,7 +75,7 @@ function buildIndicesValidateQuery (opts) { } // check required url components - if (params.type != null && (params.index == null)) { + if (params['type'] != null && (params['index'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/ingest.delete_pipeline.js b/api/api/ingest.delete_pipeline.js index 18c83337c..800d88478 100644 --- a/api/api/ingest.delete_pipeline.js +++ b/api/api/ingest.delete_pipeline.js @@ -60,7 +60,7 @@ function buildIngestDeletePipeline (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/ingest.put_pipeline.js b/api/api/ingest.put_pipeline.js index 1e6504b52..80d71f5d6 100644 --- a/api/api/ingest.put_pipeline.js +++ b/api/api/ingest.put_pipeline.js @@ -60,11 +60,11 @@ function buildIngestPutPipeline (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ingest.simulate.js b/api/api/ingest.simulate.js index 5ed060c46..6bb34e43a 100644 --- a/api/api/ingest.simulate.js +++ b/api/api/ingest.simulate.js @@ -58,7 +58,7 @@ function buildIngestSimulate (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/mget.js b/api/api/mget.js index 2292f9420..26f90cd4c 100644 --- a/api/api/mget.js +++ b/api/api/mget.js @@ -68,13 +68,13 @@ function buildMget (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/ml.close_job.js b/api/api/ml.close_job.js index 7ba123cb9..d2e05a477 100644 --- a/api/api/ml.close_job.js +++ b/api/api/ml.close_job.js @@ -55,7 +55,7 @@ function buildMlCloseJob (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.delete_calendar.js b/api/api/ml.delete_calendar.js index 6def5b1a8..56836df19 100644 --- a/api/api/ml.delete_calendar.js +++ b/api/api/ml.delete_calendar.js @@ -52,7 +52,7 @@ function buildMlDeleteCalendar (opts) { } // check required parameters - if (params.calendar_id == null && params.calendarId == null) { + if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } diff --git a/api/api/ml.delete_calendar_event.js b/api/api/ml.delete_calendar_event.js index 9b42c9e56..245454ef4 100644 --- a/api/api/ml.delete_calendar_event.js +++ b/api/api/ml.delete_calendar_event.js @@ -52,17 +52,17 @@ function buildMlDeleteCalendarEvent (opts) { } // check required parameters - if (params.calendar_id == null && params.calendarId == null) { + if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: calendar_id') return handleError(err, callback) } diff --git a/api/api/ml.delete_calendar_job.js b/api/api/ml.delete_calendar_job.js index 3d2220bbe..8b7779e16 100644 --- a/api/api/ml.delete_calendar_job.js +++ b/api/api/ml.delete_calendar_job.js @@ -52,17 +52,17 @@ function buildMlDeleteCalendarJob (opts) { } // check required parameters - if (params.calendar_id == null && params.calendarId == null) { + if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: calendar_id') return handleError(err, callback) } diff --git a/api/api/ml.delete_data_frame_analytics.js b/api/api/ml.delete_data_frame_analytics.js index fc95210c2..e8f7681f4 100644 --- a/api/api/ml.delete_data_frame_analytics.js +++ b/api/api/ml.delete_data_frame_analytics.js @@ -53,7 +53,7 @@ function buildMlDeleteDataFrameAnalytics (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/ml.delete_datafeed.js b/api/api/ml.delete_datafeed.js index bcdeab80c..bca96e80a 100644 --- a/api/api/ml.delete_datafeed.js +++ b/api/api/ml.delete_datafeed.js @@ -52,7 +52,7 @@ function buildMlDeleteDatafeed (opts) { } // check required parameters - if (params.datafeed_id == null && params.datafeedId == null) { + if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } diff --git a/api/api/ml.delete_filter.js b/api/api/ml.delete_filter.js index b5281917a..b04449b41 100644 --- a/api/api/ml.delete_filter.js +++ b/api/api/ml.delete_filter.js @@ -52,7 +52,7 @@ function buildMlDeleteFilter (opts) { } // check required parameters - if (params.filter_id == null && params.filterId == null) { + if (params['filter_id'] == null && params['filterId'] == null) { const err = new ConfigurationError('Missing required parameter: filter_id or filterId') return handleError(err, callback) } diff --git a/api/api/ml.delete_forecast.js b/api/api/ml.delete_forecast.js index 41026d9ee..083fcf063 100644 --- a/api/api/ml.delete_forecast.js +++ b/api/api/ml.delete_forecast.js @@ -54,13 +54,13 @@ function buildMlDeleteForecast (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.delete_job.js b/api/api/ml.delete_job.js index 4204f8fc7..0a326cb8a 100644 --- a/api/api/ml.delete_job.js +++ b/api/api/ml.delete_job.js @@ -53,7 +53,7 @@ function buildMlDeleteJob (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.delete_model_snapshot.js b/api/api/ml.delete_model_snapshot.js index ce61ff928..6bcfe8350 100644 --- a/api/api/ml.delete_model_snapshot.js +++ b/api/api/ml.delete_model_snapshot.js @@ -52,17 +52,17 @@ function buildMlDeleteModelSnapshot (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.delete_trained_model.js b/api/api/ml.delete_trained_model.js index c4d0e0348..f91a9ae6d 100644 --- a/api/api/ml.delete_trained_model.js +++ b/api/api/ml.delete_trained_model.js @@ -52,7 +52,7 @@ function buildMlDeleteTrainedModel (opts) { } // check required parameters - if (params.model_id == null && params.modelId == null) { + if (params['model_id'] == null && params['modelId'] == null) { const err = new ConfigurationError('Missing required parameter: model_id or modelId') return handleError(err, callback) } diff --git a/api/api/ml.estimate_model_memory.js b/api/api/ml.estimate_model_memory.js index 5e7cebb29..ad6503afe 100644 --- a/api/api/ml.estimate_model_memory.js +++ b/api/api/ml.estimate_model_memory.js @@ -52,7 +52,7 @@ function buildMlEstimateModelMemory (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.evaluate_data_frame.js b/api/api/ml.evaluate_data_frame.js index 3dfdfb4af..340174469 100644 --- a/api/api/ml.evaluate_data_frame.js +++ b/api/api/ml.evaluate_data_frame.js @@ -52,7 +52,7 @@ function buildMlEvaluateDataFrame (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.find_file_structure.js b/api/api/ml.find_file_structure.js index bfd6efe55..244bf367d 100644 --- a/api/api/ml.find_file_structure.js +++ b/api/api/ml.find_file_structure.js @@ -73,7 +73,7 @@ function buildMlFindFileStructure (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.flush_job.js b/api/api/ml.flush_job.js index 68562d94a..59acb4e3d 100644 --- a/api/api/ml.flush_job.js +++ b/api/api/ml.flush_job.js @@ -58,7 +58,7 @@ function buildMlFlushJob (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.forecast.js b/api/api/ml.forecast.js index 7eb241c5a..3d013827f 100644 --- a/api/api/ml.forecast.js +++ b/api/api/ml.forecast.js @@ -55,7 +55,7 @@ function buildMlForecast (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.get_buckets.js b/api/api/ml.get_buckets.js index f53a1020d..50fd3d93b 100644 --- a/api/api/ml.get_buckets.js +++ b/api/api/ml.get_buckets.js @@ -62,13 +62,13 @@ function buildMlGetBuckets (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.get_calendar_events.js b/api/api/ml.get_calendar_events.js index 80f362391..96cee1ae8 100644 --- a/api/api/ml.get_calendar_events.js +++ b/api/api/ml.get_calendar_events.js @@ -57,7 +57,7 @@ function buildMlGetCalendarEvents (opts) { } // check required parameters - if (params.calendar_id == null && params.calendarId == null) { + if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } diff --git a/api/api/ml.get_categories.js b/api/api/ml.get_categories.js index 1f13b2617..48f0ffee2 100644 --- a/api/api/ml.get_categories.js +++ b/api/api/ml.get_categories.js @@ -54,13 +54,13 @@ function buildMlGetCategories (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.get_influencers.js b/api/api/ml.get_influencers.js index 9cbef8aad..b2ec85a79 100644 --- a/api/api/ml.get_influencers.js +++ b/api/api/ml.get_influencers.js @@ -61,7 +61,7 @@ function buildMlGetInfluencers (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.get_model_snapshots.js b/api/api/ml.get_model_snapshots.js index 92011b83e..35a04122e 100644 --- a/api/api/ml.get_model_snapshots.js +++ b/api/api/ml.get_model_snapshots.js @@ -57,13 +57,13 @@ function buildMlGetModelSnapshots (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.get_overall_buckets.js b/api/api/ml.get_overall_buckets.js index 093340b85..c918d7710 100644 --- a/api/api/ml.get_overall_buckets.js +++ b/api/api/ml.get_overall_buckets.js @@ -62,7 +62,7 @@ function buildMlGetOverallBuckets (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.get_records.js b/api/api/ml.get_records.js index bd588ba47..6b705f197 100644 --- a/api/api/ml.get_records.js +++ b/api/api/ml.get_records.js @@ -61,7 +61,7 @@ function buildMlGetRecords (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.open_job.js b/api/api/ml.open_job.js index e4a2063be..bcfeeab87 100644 --- a/api/api/ml.open_job.js +++ b/api/api/ml.open_job.js @@ -52,7 +52,7 @@ function buildMlOpenJob (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } diff --git a/api/api/ml.post_calendar_events.js b/api/api/ml.post_calendar_events.js index 7099d9e51..36d4f5555 100644 --- a/api/api/ml.post_calendar_events.js +++ b/api/api/ml.post_calendar_events.js @@ -52,11 +52,11 @@ function buildMlPostCalendarEvents (opts) { } // check required parameters - if (params.calendar_id == null && params.calendarId == null) { + if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.post_data.js b/api/api/ml.post_data.js index 9ed7b7e0e..add1be8b9 100644 --- a/api/api/ml.post_data.js +++ b/api/api/ml.post_data.js @@ -54,11 +54,11 @@ function buildMlPostData (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.preview_datafeed.js b/api/api/ml.preview_datafeed.js index e01687c48..81fe13333 100644 --- a/api/api/ml.preview_datafeed.js +++ b/api/api/ml.preview_datafeed.js @@ -52,7 +52,7 @@ function buildMlPreviewDatafeed (opts) { } // check required parameters - if (params.datafeed_id == null && params.datafeedId == null) { + if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } diff --git a/api/api/ml.put_calendar.js b/api/api/ml.put_calendar.js index da38e3900..439e94bba 100644 --- a/api/api/ml.put_calendar.js +++ b/api/api/ml.put_calendar.js @@ -52,7 +52,7 @@ function buildMlPutCalendar (opts) { } // check required parameters - if (params.calendar_id == null && params.calendarId == null) { + if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') return handleError(err, callback) } diff --git a/api/api/ml.put_calendar_job.js b/api/api/ml.put_calendar_job.js index 7a278e83a..8e95b0c0f 100644 --- a/api/api/ml.put_calendar_job.js +++ b/api/api/ml.put_calendar_job.js @@ -52,17 +52,17 @@ function buildMlPutCalendarJob (opts) { } // check required parameters - if (params.calendar_id == null && params.calendarId == null) { + if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: calendar_id') return handleError(err, callback) } diff --git a/api/api/ml.put_data_frame_analytics.js b/api/api/ml.put_data_frame_analytics.js index 51e12f448..58b2f9d15 100644 --- a/api/api/ml.put_data_frame_analytics.js +++ b/api/api/ml.put_data_frame_analytics.js @@ -52,11 +52,11 @@ function buildMlPutDataFrameAnalytics (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.put_datafeed.js b/api/api/ml.put_datafeed.js index ce5c490d2..f6daf211f 100644 --- a/api/api/ml.put_datafeed.js +++ b/api/api/ml.put_datafeed.js @@ -58,11 +58,11 @@ function buildMlPutDatafeed (opts) { } // check required parameters - if (params.datafeed_id == null && params.datafeedId == null) { + if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.put_filter.js b/api/api/ml.put_filter.js index 51e856fdc..b86b0a90f 100644 --- a/api/api/ml.put_filter.js +++ b/api/api/ml.put_filter.js @@ -52,11 +52,11 @@ function buildMlPutFilter (opts) { } // check required parameters - if (params.filter_id == null && params.filterId == null) { + if (params['filter_id'] == null && params['filterId'] == null) { const err = new ConfigurationError('Missing required parameter: filter_id or filterId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.put_job.js b/api/api/ml.put_job.js index 408565cd5..25561f777 100644 --- a/api/api/ml.put_job.js +++ b/api/api/ml.put_job.js @@ -52,11 +52,11 @@ function buildMlPutJob (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.put_trained_model.js b/api/api/ml.put_trained_model.js index ddf9a40e6..28b2e4061 100644 --- a/api/api/ml.put_trained_model.js +++ b/api/api/ml.put_trained_model.js @@ -52,11 +52,11 @@ function buildMlPutTrainedModel (opts) { } // check required parameters - if (params.model_id == null && params.modelId == null) { + if (params['model_id'] == null && params['modelId'] == null) { const err = new ConfigurationError('Missing required parameter: model_id or modelId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.revert_model_snapshot.js b/api/api/ml.revert_model_snapshot.js index 2ed500095..26b7cd038 100644 --- a/api/api/ml.revert_model_snapshot.js +++ b/api/api/ml.revert_model_snapshot.js @@ -52,17 +52,17 @@ function buildMlRevertModelSnapshot (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('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 ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.start_data_frame_analytics.js b/api/api/ml.start_data_frame_analytics.js index b69e03bcd..605d89de3 100644 --- a/api/api/ml.start_data_frame_analytics.js +++ b/api/api/ml.start_data_frame_analytics.js @@ -52,7 +52,7 @@ function buildMlStartDataFrameAnalytics (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/ml.start_datafeed.js b/api/api/ml.start_datafeed.js index e0a7ca97c..815ddf9ac 100644 --- a/api/api/ml.start_datafeed.js +++ b/api/api/ml.start_datafeed.js @@ -54,7 +54,7 @@ function buildMlStartDatafeed (opts) { } // check required parameters - if (params.datafeed_id == null && params.datafeedId == null) { + if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } diff --git a/api/api/ml.stop_data_frame_analytics.js b/api/api/ml.stop_data_frame_analytics.js index 2a0f1f7c0..5c61d4968 100644 --- a/api/api/ml.stop_data_frame_analytics.js +++ b/api/api/ml.stop_data_frame_analytics.js @@ -55,7 +55,7 @@ function buildMlStopDataFrameAnalytics (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/ml.stop_datafeed.js b/api/api/ml.stop_datafeed.js index 0f93c7c1e..c479cbe8f 100644 --- a/api/api/ml.stop_datafeed.js +++ b/api/api/ml.stop_datafeed.js @@ -55,7 +55,7 @@ function buildMlStopDatafeed (opts) { } // check required parameters - if (params.datafeed_id == null && params.datafeedId == null) { + if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } diff --git a/api/api/ml.update_data_frame_analytics.js b/api/api/ml.update_data_frame_analytics.js index cd94e0be0..27afffea7 100644 --- a/api/api/ml.update_data_frame_analytics.js +++ b/api/api/ml.update_data_frame_analytics.js @@ -52,11 +52,11 @@ function buildMlUpdateDataFrameAnalytics (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.update_datafeed.js b/api/api/ml.update_datafeed.js index fae02c90d..2eaba2c35 100644 --- a/api/api/ml.update_datafeed.js +++ b/api/api/ml.update_datafeed.js @@ -58,11 +58,11 @@ function buildMlUpdateDatafeed (opts) { } // check required parameters - if (params.datafeed_id == null && params.datafeedId == null) { + if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.update_filter.js b/api/api/ml.update_filter.js index 5074ca458..e0954ac6e 100644 --- a/api/api/ml.update_filter.js +++ b/api/api/ml.update_filter.js @@ -52,11 +52,11 @@ function buildMlUpdateFilter (opts) { } // check required parameters - if (params.filter_id == null && params.filterId == null) { + if (params['filter_id'] == null && params['filterId'] == null) { const err = new ConfigurationError('Missing required parameter: filter_id or filterId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.update_job.js b/api/api/ml.update_job.js index efc9e6c36..09a465834 100644 --- a/api/api/ml.update_job.js +++ b/api/api/ml.update_job.js @@ -52,11 +52,11 @@ function buildMlUpdateJob (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.update_model_snapshot.js b/api/api/ml.update_model_snapshot.js index 7ae5f03f8..5b42e5bfe 100644 --- a/api/api/ml.update_model_snapshot.js +++ b/api/api/ml.update_model_snapshot.js @@ -52,21 +52,21 @@ function buildMlUpdateModelSnapshot (opts) { } // check required parameters - if (params.job_id == null && params.jobId == null) { + if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter: snapshot_id or snapshotId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: job_id') return handleError(err, callback) } diff --git a/api/api/ml.validate.js b/api/api/ml.validate.js index 992c74097..afb91108a 100644 --- a/api/api/ml.validate.js +++ b/api/api/ml.validate.js @@ -52,7 +52,7 @@ function buildMlValidate (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/ml.validate_detector.js b/api/api/ml.validate_detector.js index 09a6710ab..f75c5d7d9 100644 --- a/api/api/ml.validate_detector.js +++ b/api/api/ml.validate_detector.js @@ -52,7 +52,7 @@ function buildMlValidateDetector (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/monitoring.bulk.js b/api/api/monitoring.bulk.js index 037f8043b..ca0e6da01 100644 --- a/api/api/monitoring.bulk.js +++ b/api/api/monitoring.bulk.js @@ -56,7 +56,7 @@ function buildMonitoringBulk (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/msearch.js b/api/api/msearch.js index fe4fd840b..4afc1ea8e 100644 --- a/api/api/msearch.js +++ b/api/api/msearch.js @@ -71,13 +71,13 @@ function buildMsearch (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/msearch_template.js b/api/api/msearch_template.js index 545ab9645..7617b9ee1 100644 --- a/api/api/msearch_template.js +++ b/api/api/msearch_template.js @@ -67,13 +67,13 @@ function buildMsearchTemplate (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/mtermvectors.js b/api/api/mtermvectors.js index fc6e40dab..aa3df4e4e 100644 --- a/api/api/mtermvectors.js +++ b/api/api/mtermvectors.js @@ -72,7 +72,7 @@ function buildMtermvectors (opts) { } // check required url components - if (params.type != null && (params.index == null)) { + if (params['type'] != null && (params['index'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/put_script.js b/api/api/put_script.js index 4b41a4bc4..306017ad2 100644 --- a/api/api/put_script.js +++ b/api/api/put_script.js @@ -61,17 +61,17 @@ function buildPutScript (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: id') return handleError(err, callback) } diff --git a/api/api/rank_eval.js b/api/api/rank_eval.js index b972bb9c1..f068f888a 100644 --- a/api/api/rank_eval.js +++ b/api/api/rank_eval.js @@ -65,7 +65,7 @@ function buildRankEval (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/reindex.js b/api/api/reindex.js index 91bc0c005..99ef2b3e2 100644 --- a/api/api/reindex.js +++ b/api/api/reindex.js @@ -71,7 +71,7 @@ documents from a remote cluster. } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/reindex_rethrottle.js b/api/api/reindex_rethrottle.js index 35c19a1dc..4e482a33b 100644 --- a/api/api/reindex_rethrottle.js +++ b/api/api/reindex_rethrottle.js @@ -59,11 +59,11 @@ function buildReindexRethrottle (opts) { } // check required parameters - if (params.task_id == null && params.taskId == null) { + if (params['task_id'] == null && params['taskId'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond') return handleError(err, callback) } diff --git a/api/api/rollup.delete_job.js b/api/api/rollup.delete_job.js index cd98ce06c..5adcfb7e7 100644 --- a/api/api/rollup.delete_job.js +++ b/api/api/rollup.delete_job.js @@ -52,7 +52,7 @@ function buildRollupDeleteJob (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/rollup.get_rollup_index_caps.js b/api/api/rollup.get_rollup_index_caps.js index 50fc73ce6..1599e1e22 100644 --- a/api/api/rollup.get_rollup_index_caps.js +++ b/api/api/rollup.get_rollup_index_caps.js @@ -52,7 +52,7 @@ function buildRollupGetRollupIndexCaps (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/rollup.put_job.js b/api/api/rollup.put_job.js index 542c89278..74ad711ea 100644 --- a/api/api/rollup.put_job.js +++ b/api/api/rollup.put_job.js @@ -52,11 +52,11 @@ function buildRollupPutJob (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/rollup.rollup_search.js b/api/api/rollup.rollup_search.js index 4681530be..b50bb4a21 100644 --- a/api/api/rollup.rollup_search.js +++ b/api/api/rollup.rollup_search.js @@ -54,17 +54,17 @@ function buildRollupRollupSearch (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/rollup.start_job.js b/api/api/rollup.start_job.js index 0aaacd745..7e99e2c41 100644 --- a/api/api/rollup.start_job.js +++ b/api/api/rollup.start_job.js @@ -52,7 +52,7 @@ function buildRollupStartJob (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/rollup.stop_job.js b/api/api/rollup.stop_job.js index 25cc98bbf..f4d9b64b7 100644 --- a/api/api/rollup.stop_job.js +++ b/api/api/rollup.stop_job.js @@ -54,7 +54,7 @@ function buildRollupStopJob (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/search.js b/api/api/search.js index 615471968..2621c0dbd 100644 --- a/api/api/search.js +++ b/api/api/search.js @@ -126,7 +126,7 @@ function buildSearch (opts) { } // check required url components - if (params.type != null && (params.index == null)) { + if (params['type'] != null && (params['index'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/search_template.js b/api/api/search_template.js index d525264da..12d96a588 100644 --- a/api/api/search_template.js +++ b/api/api/search_template.js @@ -78,13 +78,13 @@ function buildSearchTemplate (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/searchable_snapshots.mount.js b/api/api/searchable_snapshots.mount.js index 8219584c6..456b0463c 100644 --- a/api/api/searchable_snapshots.mount.js +++ b/api/api/searchable_snapshots.mount.js @@ -54,21 +54,21 @@ function buildSearchableSnapshotsMount (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params.snapshot == null) { + if (params['snapshot'] == null) { const err = new ConfigurationError('Missing required parameter: snapshot') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/searchable_snapshots.repository_stats.js b/api/api/searchable_snapshots.repository_stats.js index a4149608b..a96362827 100644 --- a/api/api/searchable_snapshots.repository_stats.js +++ b/api/api/searchable_snapshots.repository_stats.js @@ -52,7 +52,7 @@ function buildSearchableSnapshotsRepositoryStats (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } diff --git a/api/api/security.change_password.js b/api/api/security.change_password.js index 19a8afa2d..e5cebad94 100644 --- a/api/api/security.change_password.js +++ b/api/api/security.change_password.js @@ -52,7 +52,7 @@ function buildSecurityChangePassword (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.clear_cached_privileges.js b/api/api/security.clear_cached_privileges.js index 19be21fbd..8c7ea4411 100644 --- a/api/api/security.clear_cached_privileges.js +++ b/api/api/security.clear_cached_privileges.js @@ -52,7 +52,7 @@ function buildSecurityClearCachedPrivileges (opts) { } // check required parameters - if (params.application == null) { + if (params['application'] == null) { const err = new ConfigurationError('Missing required parameter: application') return handleError(err, callback) } diff --git a/api/api/security.clear_cached_realms.js b/api/api/security.clear_cached_realms.js index 81071429e..07541f6cf 100644 --- a/api/api/security.clear_cached_realms.js +++ b/api/api/security.clear_cached_realms.js @@ -52,7 +52,7 @@ function buildSecurityClearCachedRealms (opts) { } // check required parameters - if (params.realms == null) { + if (params['realms'] == null) { const err = new ConfigurationError('Missing required parameter: realms') return handleError(err, callback) } diff --git a/api/api/security.clear_cached_roles.js b/api/api/security.clear_cached_roles.js index 82d9c4563..cec426546 100644 --- a/api/api/security.clear_cached_roles.js +++ b/api/api/security.clear_cached_roles.js @@ -52,7 +52,7 @@ function buildSecurityClearCachedRoles (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/security.create_api_key.js b/api/api/security.create_api_key.js index 742b613e4..d2d3fe907 100644 --- a/api/api/security.create_api_key.js +++ b/api/api/security.create_api_key.js @@ -52,7 +52,7 @@ function buildSecurityCreateApiKey (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.delete_privileges.js b/api/api/security.delete_privileges.js index f208616ad..6cb2f074f 100644 --- a/api/api/security.delete_privileges.js +++ b/api/api/security.delete_privileges.js @@ -52,17 +52,17 @@ function buildSecurityDeletePrivileges (opts) { } // check required parameters - if (params.application == null) { + if (params['application'] == null) { const err = new ConfigurationError('Missing required parameter: application') return handleError(err, callback) } - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: application') return handleError(err, callback) } diff --git a/api/api/security.delete_role.js b/api/api/security.delete_role.js index bbaa2646d..5367bd78f 100644 --- a/api/api/security.delete_role.js +++ b/api/api/security.delete_role.js @@ -52,7 +52,7 @@ function buildSecurityDeleteRole (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/security.delete_role_mapping.js b/api/api/security.delete_role_mapping.js index 951860d72..3716059e5 100644 --- a/api/api/security.delete_role_mapping.js +++ b/api/api/security.delete_role_mapping.js @@ -52,7 +52,7 @@ function buildSecurityDeleteRoleMapping (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } diff --git a/api/api/security.delete_user.js b/api/api/security.delete_user.js index d427ac105..dc23dc215 100644 --- a/api/api/security.delete_user.js +++ b/api/api/security.delete_user.js @@ -52,7 +52,7 @@ function buildSecurityDeleteUser (opts) { } // check required parameters - if (params.username == null) { + if (params['username'] == null) { const err = new ConfigurationError('Missing required parameter: username') return handleError(err, callback) } diff --git a/api/api/security.disable_user.js b/api/api/security.disable_user.js index 9e0d4fd24..5f2d2e49c 100644 --- a/api/api/security.disable_user.js +++ b/api/api/security.disable_user.js @@ -52,7 +52,7 @@ function buildSecurityDisableUser (opts) { } // check required parameters - if (params.username == null) { + if (params['username'] == null) { const err = new ConfigurationError('Missing required parameter: username') return handleError(err, callback) } diff --git a/api/api/security.enable_user.js b/api/api/security.enable_user.js index 954f30ecf..d3040ad4b 100644 --- a/api/api/security.enable_user.js +++ b/api/api/security.enable_user.js @@ -52,7 +52,7 @@ function buildSecurityEnableUser (opts) { } // check required parameters - if (params.username == null) { + if (params['username'] == null) { const err = new ConfigurationError('Missing required parameter: username') return handleError(err, callback) } diff --git a/api/api/security.get_privileges.js b/api/api/security.get_privileges.js index 820dcf4cc..1d972e04c 100644 --- a/api/api/security.get_privileges.js +++ b/api/api/security.get_privileges.js @@ -52,7 +52,7 @@ function buildSecurityGetPrivileges (opts) { } // check required url components - if (params.name != null && (params.application == null)) { + if (params['name'] != null && (params['application'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: application') return handleError(err, callback) } diff --git a/api/api/security.get_token.js b/api/api/security.get_token.js index a8c232a26..6dabe8633 100644 --- a/api/api/security.get_token.js +++ b/api/api/security.get_token.js @@ -52,7 +52,7 @@ function buildSecurityGetToken (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.has_privileges.js b/api/api/security.has_privileges.js index 7c0aaeb3f..70a678657 100644 --- a/api/api/security.has_privileges.js +++ b/api/api/security.has_privileges.js @@ -52,7 +52,7 @@ function buildSecurityHasPrivileges (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.invalidate_api_key.js b/api/api/security.invalidate_api_key.js index 422c78ed6..2a738c518 100644 --- a/api/api/security.invalidate_api_key.js +++ b/api/api/security.invalidate_api_key.js @@ -52,7 +52,7 @@ function buildSecurityInvalidateApiKey (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.invalidate_token.js b/api/api/security.invalidate_token.js index e46ce299d..1334aaf9e 100644 --- a/api/api/security.invalidate_token.js +++ b/api/api/security.invalidate_token.js @@ -52,7 +52,7 @@ function buildSecurityInvalidateToken (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.put_privileges.js b/api/api/security.put_privileges.js index 3b1120910..04af04e28 100644 --- a/api/api/security.put_privileges.js +++ b/api/api/security.put_privileges.js @@ -52,7 +52,7 @@ function buildSecurityPutPrivileges (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.put_role.js b/api/api/security.put_role.js index 501f84345..dc392a087 100644 --- a/api/api/security.put_role.js +++ b/api/api/security.put_role.js @@ -52,11 +52,11 @@ function buildSecurityPutRole (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.put_role_mapping.js b/api/api/security.put_role_mapping.js index e7fcae8ff..9a4e13d17 100644 --- a/api/api/security.put_role_mapping.js +++ b/api/api/security.put_role_mapping.js @@ -52,11 +52,11 @@ function buildSecurityPutRoleMapping (opts) { } // check required parameters - if (params.name == null) { + if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/security.put_user.js b/api/api/security.put_user.js index f92505f7d..36b9b76da 100644 --- a/api/api/security.put_user.js +++ b/api/api/security.put_user.js @@ -52,11 +52,11 @@ function buildSecurityPutUser (opts) { } // check required parameters - if (params.username == null) { + if (params['username'] == null) { const err = new ConfigurationError('Missing required parameter: username') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/slm.delete_lifecycle.js b/api/api/slm.delete_lifecycle.js index 604e97169..3527de75c 100644 --- a/api/api/slm.delete_lifecycle.js +++ b/api/api/slm.delete_lifecycle.js @@ -52,7 +52,7 @@ function buildSlmDeleteLifecycle (opts) { } // check required parameters - if (params.policy_id == null && params.policyId == null) { + if (params['policy_id'] == null && params['policyId'] == null) { const err = new ConfigurationError('Missing required parameter: policy_id or policyId') return handleError(err, callback) } diff --git a/api/api/slm.execute_lifecycle.js b/api/api/slm.execute_lifecycle.js index dbf366095..aa2ca8f46 100644 --- a/api/api/slm.execute_lifecycle.js +++ b/api/api/slm.execute_lifecycle.js @@ -52,7 +52,7 @@ function buildSlmExecuteLifecycle (opts) { } // check required parameters - if (params.policy_id == null && params.policyId == null) { + if (params['policy_id'] == null && params['policyId'] == null) { const err = new ConfigurationError('Missing required parameter: policy_id or policyId') return handleError(err, callback) } diff --git a/api/api/slm.put_lifecycle.js b/api/api/slm.put_lifecycle.js index 309dd8ff3..899b82d39 100644 --- a/api/api/slm.put_lifecycle.js +++ b/api/api/slm.put_lifecycle.js @@ -52,7 +52,7 @@ function buildSlmPutLifecycle (opts) { } // check required parameters - if (params.policy_id == null && params.policyId == null) { + if (params['policy_id'] == null && params['policyId'] == null) { const err = new ConfigurationError('Missing required parameter: policy_id or policyId') return handleError(err, callback) } diff --git a/api/api/snapshot.cleanup_repository.js b/api/api/snapshot.cleanup_repository.js index b16aebd86..1f0a922c3 100644 --- a/api/api/snapshot.cleanup_repository.js +++ b/api/api/snapshot.cleanup_repository.js @@ -60,7 +60,7 @@ function buildSnapshotCleanupRepository (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.create.js b/api/api/snapshot.create.js index eae0773f8..4356e32bf 100644 --- a/api/api/snapshot.create.js +++ b/api/api/snapshot.create.js @@ -61,17 +61,17 @@ function buildSnapshotCreate (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params.snapshot == null) { + if (params['snapshot'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.create_repository.js b/api/api/snapshot.create_repository.js index 2561d0b22..d8932b491 100644 --- a/api/api/snapshot.create_repository.js +++ b/api/api/snapshot.create_repository.js @@ -61,11 +61,11 @@ function buildSnapshotCreateRepository (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/snapshot.delete.js b/api/api/snapshot.delete.js index 528cd8f2d..c9967cb70 100644 --- a/api/api/snapshot.delete.js +++ b/api/api/snapshot.delete.js @@ -59,17 +59,17 @@ function buildSnapshotDelete (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params.snapshot == null) { + if (params['snapshot'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.delete_repository.js b/api/api/snapshot.delete_repository.js index 69334ef12..cc42a2331 100644 --- a/api/api/snapshot.delete_repository.js +++ b/api/api/snapshot.delete_repository.js @@ -60,7 +60,7 @@ function buildSnapshotDeleteRepository (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.get.js b/api/api/snapshot.get.js index 4640d9c58..cbd79df5a 100644 --- a/api/api/snapshot.get.js +++ b/api/api/snapshot.get.js @@ -62,17 +62,17 @@ function buildSnapshotGet (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params.snapshot == null) { + if (params['snapshot'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.restore.js b/api/api/snapshot.restore.js index 5ff366770..422f0a67d 100644 --- a/api/api/snapshot.restore.js +++ b/api/api/snapshot.restore.js @@ -61,17 +61,17 @@ function buildSnapshotRestore (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } - if (params.snapshot == null) { + if (params['snapshot'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.status.js b/api/api/snapshot.status.js index 5ac9eefa3..a74953ef7 100644 --- a/api/api/snapshot.status.js +++ b/api/api/snapshot.status.js @@ -61,7 +61,7 @@ function buildSnapshotStatus (opts) { } // check required url components - if (params.snapshot != null && (params.repository == null)) { + if (params['snapshot'] != null && (params['repository'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: repository') return handleError(err, callback) } diff --git a/api/api/snapshot.verify_repository.js b/api/api/snapshot.verify_repository.js index f8be85c25..e2f01a810 100644 --- a/api/api/snapshot.verify_repository.js +++ b/api/api/snapshot.verify_repository.js @@ -60,7 +60,7 @@ function buildSnapshotVerifyRepository (opts) { } // check required parameters - if (params.repository == null) { + if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') return handleError(err, callback) } diff --git a/api/api/sql.clear_cursor.js b/api/api/sql.clear_cursor.js index cc3b2535f..2613ee18f 100644 --- a/api/api/sql.clear_cursor.js +++ b/api/api/sql.clear_cursor.js @@ -52,7 +52,7 @@ function buildSqlClearCursor (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/sql.query.js b/api/api/sql.query.js index df07251f8..d5bc8116c 100644 --- a/api/api/sql.query.js +++ b/api/api/sql.query.js @@ -52,7 +52,7 @@ function buildSqlQuery (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/sql.translate.js b/api/api/sql.translate.js index 30b78736d..38552262a 100644 --- a/api/api/sql.translate.js +++ b/api/api/sql.translate.js @@ -52,7 +52,7 @@ function buildSqlTranslate (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/tasks.get.js b/api/api/tasks.get.js index 6594bc8f3..d864c9bff 100644 --- a/api/api/tasks.get.js +++ b/api/api/tasks.get.js @@ -60,7 +60,7 @@ function buildTasksGet (opts) { } // check required parameters - if (params.task_id == null && params.taskId == null) { + if (params['task_id'] == null && params['taskId'] == null) { const err = new ConfigurationError('Missing required parameter: task_id or taskId') return handleError(err, callback) } diff --git a/api/api/termvectors.js b/api/api/termvectors.js index 911818617..8542f082a 100644 --- a/api/api/termvectors.js +++ b/api/api/termvectors.js @@ -71,7 +71,7 @@ function buildTermvectors (opts) { } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } diff --git a/api/api/transform.delete_transform.js b/api/api/transform.delete_transform.js index 4ccaee2f4..7c2a5cc19 100644 --- a/api/api/transform.delete_transform.js +++ b/api/api/transform.delete_transform.js @@ -52,7 +52,7 @@ function buildTransformDeleteTransform (opts) { } // check required parameters - if (params.transform_id == null && params.transformId == null) { + if (params['transform_id'] == null && params['transformId'] == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } diff --git a/api/api/transform.get_transform_stats.js b/api/api/transform.get_transform_stats.js index 8e265571c..78c2621ed 100644 --- a/api/api/transform.get_transform_stats.js +++ b/api/api/transform.get_transform_stats.js @@ -54,7 +54,7 @@ function buildTransformGetTransformStats (opts) { } // check required parameters - if (params.transform_id == null && params.transformId == null) { + if (params['transform_id'] == null && params['transformId'] == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } diff --git a/api/api/transform.preview_transform.js b/api/api/transform.preview_transform.js index e7cfa5392..49f314f3d 100644 --- a/api/api/transform.preview_transform.js +++ b/api/api/transform.preview_transform.js @@ -52,7 +52,7 @@ function buildTransformPreviewTransform (opts) { } // check required parameters - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/transform.put_transform.js b/api/api/transform.put_transform.js index b4049b0f8..6694c6d29 100644 --- a/api/api/transform.put_transform.js +++ b/api/api/transform.put_transform.js @@ -52,11 +52,11 @@ function buildTransformPutTransform (opts) { } // check required parameters - if (params.transform_id == null && params.transformId == null) { + if (params['transform_id'] == null && params['transformId'] == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/transform.start_transform.js b/api/api/transform.start_transform.js index 4eee46c18..65300821b 100644 --- a/api/api/transform.start_transform.js +++ b/api/api/transform.start_transform.js @@ -52,7 +52,7 @@ function buildTransformStartTransform (opts) { } // check required parameters - if (params.transform_id == null && params.transformId == null) { + if (params['transform_id'] == null && params['transformId'] == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } diff --git a/api/api/transform.stop_transform.js b/api/api/transform.stop_transform.js index b24d980e8..6ff716fd7 100644 --- a/api/api/transform.stop_transform.js +++ b/api/api/transform.stop_transform.js @@ -58,7 +58,7 @@ function buildTransformStopTransform (opts) { } // check required parameters - if (params.transform_id == null && params.transformId == null) { + if (params['transform_id'] == null && params['transformId'] == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } diff --git a/api/api/transform.update_transform.js b/api/api/transform.update_transform.js index f34b0e2f9..bc8a2d9e9 100644 --- a/api/api/transform.update_transform.js +++ b/api/api/transform.update_transform.js @@ -52,11 +52,11 @@ function buildTransformUpdateTransform (opts) { } // check required parameters - if (params.transform_id == null && params.transformId == null) { + if (params['transform_id'] == null && params['transformId'] == null) { const err = new ConfigurationError('Missing required parameter: transform_id or transformId') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/update.js b/api/api/update.js index 572661637..cd013fcfc 100644 --- a/api/api/update.js +++ b/api/api/update.js @@ -76,15 +76,15 @@ function buildUpdate (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } - if (params.body == null) { + if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') return handleError(err, callback) } diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js index da1e87c57..745e55661 100644 --- a/api/api/update_by_query.js +++ b/api/api/update_by_query.js @@ -110,13 +110,13 @@ for example to pick up a mapping change. } // check required parameters - if (params.index == null) { + if (params['index'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: index') return handleError(err, callback) } diff --git a/api/api/update_by_query_rethrottle.js b/api/api/update_by_query_rethrottle.js index a118653d9..6a278def8 100644 --- a/api/api/update_by_query_rethrottle.js +++ b/api/api/update_by_query_rethrottle.js @@ -59,11 +59,11 @@ function buildUpdateByQueryRethrottle (opts) { } // check required parameters - if (params.task_id == null && params.taskId == null) { + if (params['task_id'] == null && params['taskId'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond') return handleError(err, callback) } diff --git a/api/api/watcher.ack_watch.js b/api/api/watcher.ack_watch.js index 275664f38..00d14e39f 100644 --- a/api/api/watcher.ack_watch.js +++ b/api/api/watcher.ack_watch.js @@ -52,13 +52,13 @@ function buildWatcherAckWatch (opts) { } // check required parameters - if (params.watch_id == null && params.watchId == null) { + if (params['watch_id'] == null && params['watchId'] == null) { const err = new ConfigurationError('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 ConfigurationError('Missing required parameter of the url: watch_id') return handleError(err, callback) } diff --git a/api/api/watcher.activate_watch.js b/api/api/watcher.activate_watch.js index a39c6b56d..3160e544f 100644 --- a/api/api/watcher.activate_watch.js +++ b/api/api/watcher.activate_watch.js @@ -52,7 +52,7 @@ function buildWatcherActivateWatch (opts) { } // check required parameters - if (params.watch_id == null && params.watchId == null) { + if (params['watch_id'] == null && params['watchId'] == null) { const err = new ConfigurationError('Missing required parameter: watch_id or watchId') return handleError(err, callback) } diff --git a/api/api/watcher.deactivate_watch.js b/api/api/watcher.deactivate_watch.js index 9cebf9b86..c1a1d4130 100644 --- a/api/api/watcher.deactivate_watch.js +++ b/api/api/watcher.deactivate_watch.js @@ -52,7 +52,7 @@ function buildWatcherDeactivateWatch (opts) { } // check required parameters - if (params.watch_id == null && params.watchId == null) { + if (params['watch_id'] == null && params['watchId'] == null) { const err = new ConfigurationError('Missing required parameter: watch_id or watchId') return handleError(err, callback) } diff --git a/api/api/watcher.delete_watch.js b/api/api/watcher.delete_watch.js index 222e8a2cc..0945d8534 100644 --- a/api/api/watcher.delete_watch.js +++ b/api/api/watcher.delete_watch.js @@ -52,7 +52,7 @@ function buildWatcherDeleteWatch (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/watcher.get_watch.js b/api/api/watcher.get_watch.js index 230b97230..664c5a5b6 100644 --- a/api/api/watcher.get_watch.js +++ b/api/api/watcher.get_watch.js @@ -52,7 +52,7 @@ function buildWatcherGetWatch (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/api/watcher.put_watch.js b/api/api/watcher.put_watch.js index 3369ff279..9be705e96 100644 --- a/api/api/watcher.put_watch.js +++ b/api/api/watcher.put_watch.js @@ -56,7 +56,7 @@ function buildWatcherPutWatch (opts) { } // check required parameters - if (params.id == null) { + if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') return handleError(err, callback) } diff --git a/api/kibana.d.ts b/api/kibana.d.ts index 074a5ba43..12f7cf561 100644 --- a/api/kibana.d.ts +++ b/api/kibana.d.ts @@ -134,7 +134,7 @@ interface KibanaClient { allocationExplain, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.ClusterAllocationExplain, options?: TransportRequestOptions): TransportRequestPromise> deleteComponentTemplate, TContext = Context>(params?: RequestParams.ClusterDeleteComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise> deleteVotingConfigExclusions, TContext = Context>(params?: RequestParams.ClusterDeleteVotingConfigExclusions, options?: TransportRequestOptions): TransportRequestPromise> - existsComponentTemplate, TContext = Context>(params?: RequestParams.ClusterExistsComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise> + existsComponentTemplate(params?: RequestParams.ClusterExistsComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise> getComponentTemplate, TContext = Context>(params?: RequestParams.ClusterGetComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise> getSettings, TContext = Context>(params?: RequestParams.ClusterGetSettings, options?: TransportRequestOptions): TransportRequestPromise> health, TContext = Context>(params?: RequestParams.ClusterHealth, options?: TransportRequestOptions): TransportRequestPromise> @@ -170,8 +170,8 @@ interface KibanaClient { get, TContext = Context>(params?: RequestParams.EqlGet, options?: TransportRequestOptions): TransportRequestPromise> search, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.EqlSearch, options?: TransportRequestOptions): TransportRequestPromise> } - exists, TContext = Context>(params?: RequestParams.Exists, options?: TransportRequestOptions): TransportRequestPromise> - existsSource, TContext = Context>(params?: RequestParams.ExistsSource, options?: TransportRequestOptions): TransportRequestPromise> + exists(params?: RequestParams.Exists, options?: TransportRequestOptions): TransportRequestPromise> + existsSource(params?: RequestParams.ExistsSource, options?: TransportRequestOptions): TransportRequestPromise> explain, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.Explain, options?: TransportRequestOptions): TransportRequestPromise> fieldCaps, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.FieldCaps, options?: TransportRequestOptions): TransportRequestPromise> get, TContext = Context>(params?: RequestParams.Get, options?: TransportRequestOptions): TransportRequestPromise> @@ -209,11 +209,11 @@ interface KibanaClient { deleteDataStream, TContext = Context>(params?: RequestParams.IndicesDeleteDataStream, options?: TransportRequestOptions): TransportRequestPromise> deleteIndexTemplate, TContext = Context>(params?: RequestParams.IndicesDeleteIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise> deleteTemplate, TContext = Context>(params?: RequestParams.IndicesDeleteTemplate, options?: TransportRequestOptions): TransportRequestPromise> - exists, TContext = Context>(params?: RequestParams.IndicesExists, options?: TransportRequestOptions): TransportRequestPromise> - existsAlias, TContext = Context>(params?: RequestParams.IndicesExistsAlias, options?: TransportRequestOptions): TransportRequestPromise> - existsIndexTemplate, TContext = Context>(params?: RequestParams.IndicesExistsIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise> - existsTemplate, TContext = Context>(params?: RequestParams.IndicesExistsTemplate, options?: TransportRequestOptions): TransportRequestPromise> - existsType, TContext = Context>(params?: RequestParams.IndicesExistsType, options?: TransportRequestOptions): TransportRequestPromise> + exists(params?: RequestParams.IndicesExists, options?: TransportRequestOptions): TransportRequestPromise> + existsAlias(params?: RequestParams.IndicesExistsAlias, options?: TransportRequestOptions): TransportRequestPromise> + existsIndexTemplate(params?: RequestParams.IndicesExistsIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise> + existsTemplate(params?: RequestParams.IndicesExistsTemplate, options?: TransportRequestOptions): TransportRequestPromise> + existsType(params?: RequestParams.IndicesExistsType, options?: TransportRequestOptions): TransportRequestPromise> flush, TContext = Context>(params?: RequestParams.IndicesFlush, options?: TransportRequestOptions): TransportRequestPromise> flushSynced, TContext = Context>(params?: RequestParams.IndicesFlushSynced, options?: TransportRequestOptions): TransportRequestPromise> forcemerge, TContext = Context>(params?: RequestParams.IndicesForcemerge, options?: TransportRequestOptions): TransportRequestPromise> @@ -346,7 +346,7 @@ interface KibanaClient { stats, TContext = Context>(params?: RequestParams.NodesStats, options?: TransportRequestOptions): TransportRequestPromise> usage, TContext = Context>(params?: RequestParams.NodesUsage, options?: TransportRequestOptions): TransportRequestPromise> } - ping, TContext = Context>(params?: RequestParams.Ping, options?: TransportRequestOptions): TransportRequestPromise> + ping(params?: RequestParams.Ping, options?: TransportRequestOptions): TransportRequestPromise> putScript, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.PutScript, options?: TransportRequestOptions): TransportRequestPromise> rankEval, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.RankEval, options?: TransportRequestOptions): TransportRequestPromise> reindex, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.Reindex, options?: TransportRequestOptions): TransportRequestPromise> diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 0f4adb4ac..520c01aad 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -667,17 +667,6 @@ export interface IndicesCreate extends Generic { body?: T; } -export interface IndicesCreateDataStream extends Generic { - name: string; - body?: T; -} - -export interface IndicesDataStreamsStats extends Generic { - name?: string | string[]; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - forbid_closed_indices?: boolean; -} - export interface IndicesDelete extends Generic { index: string | string[]; timeout?: string; @@ -694,10 +683,6 @@ export interface IndicesDeleteAlias extends Generic { master_timeout?: string; } -export interface IndicesDeleteDataStream extends Generic { - name: string | string[]; -} - export interface IndicesDeleteIndexTemplate extends Generic { name: string; timeout?: string; @@ -799,10 +784,6 @@ export interface IndicesGetAlias extends Generic { local?: boolean; } -export interface IndicesGetDataStream extends Generic { - name?: string | string[]; -} - export interface IndicesGetFieldMapping extends Generic { fields: string | string[]; index?: string | string[]; @@ -1763,6 +1744,19 @@ export interface IlmStart extends Generic { export interface IlmStop extends Generic { } +export interface IndicesCreateDataStream extends Generic { + name: string; + body?: T; +} + +export interface IndicesDataStreamsStats extends Generic { + name?: string | string[]; +} + +export interface IndicesDeleteDataStream extends Generic { + name: string | string[]; +} + export interface IndicesFreeze extends Generic { index: string; timeout?: string; @@ -1773,6 +1767,10 @@ export interface IndicesFreeze extends Generic { wait_for_active_shards?: string; } +export interface IndicesGetDataStream extends Generic { + name?: string | string[]; +} + export interface IndicesReloadSearchAnalyzers extends Generic { index: string | string[]; ignore_unavailable?: boolean; diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 42ee29e82..91c2e331f 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -1060,7 +1060,7 @@ client.clearScroll({ body: object }) ---- -link:{ref}/search-request-body.html#_clear_scroll_api[Documentation] + +link:{ref}/clear-scroll-api.html[Documentation] + [cols=2*] |=== |`scroll_id` or `scrollId` @@ -2686,52 +2686,6 @@ link:{ref}/indices-create-index.html[Documentation] + |=== -=== indices.createDataStream -*Stability:* experimental -[source,ts] ----- -client.indices.createDataStream({ - name: string, - body: object -}) ----- -link:{ref}/data-streams.html[Documentation] + -[cols=2*] -|=== -|`name` -|`string` - The name of the data stream - -|`body` -|`object` - The data stream definition - -|=== - -=== indices.dataStreamsStats -*Stability:* experimental -[source,ts] ----- -client.indices.dataStreamsStats({ - name: string | string[], - expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all', - forbid_closed_indices: boolean -}) ----- -link:{ref}/data-streams.html[Documentation] + -[cols=2*] -|=== -|`name` -|`string \| string[]` - A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams - -|`expand_wildcards` or `expandWildcards` -|`'open' \| 'closed' \| 'hidden' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + -_Default:_ `open` - -|`forbid_closed_indices` or `forbidClosedIndices` -|`boolean` - If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices + -_Default:_ `true` - -|=== - === indices.delete [source,ts] @@ -2797,22 +2751,6 @@ link:{ref}/indices-aliases.html[Documentation] + |=== -=== indices.deleteDataStream -*Stability:* experimental -[source,ts] ----- -client.indices.deleteDataStream({ - name: string | string[] -}) ----- -link:{ref}/data-streams.html[Documentation] + -[cols=2*] -|=== -|`name` -|`string \| string[]` - A comma-separated list of data streams to delete; use `*` to delete all data streams - -|=== - === indices.deleteIndexTemplate *Stability:* experimental [source,ts] @@ -3225,22 +3163,6 @@ _Default:_ `all` |=== -=== indices.getDataStream -*Stability:* experimental -[source,ts] ----- -client.indices.getDataStream({ - name: string | string[] -}) ----- -link:{ref}/data-streams.html[Documentation] + -[cols=2*] -|=== -|`name` -|`string \| string[]` - A comma-separated list of data streams to get; use `*` to get all data streams - -|=== - === indices.getFieldMapping [source,ts] @@ -7144,6 +7066,58 @@ client.ilm.stop() link:{ref}/ilm-stop.html[Documentation] + +=== indices.createDataStream + +[source,ts] +---- +client.indices.createDataStream({ + name: string, + body: object +}) +---- +link:{ref}/data-streams.html[Documentation] + +[cols=2*] +|=== +|`name` +|`string` - The name of the data stream + +|`body` +|`object` - The data stream definition + +|=== + +=== indices.dataStreamsStats + +[source,ts] +---- +client.indices.dataStreamsStats({ + name: string | string[] +}) +---- +link:{ref}/data-streams.html[Documentation] + +[cols=2*] +|=== +|`name` +|`string \| string[]` - A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams + +|=== + +=== indices.deleteDataStream + +[source,ts] +---- +client.indices.deleteDataStream({ + name: string | string[] +}) +---- +link:{ref}/data-streams.html[Documentation] + +[cols=2*] +|=== +|`name` +|`string \| string[]` - A comma-separated list of data streams to delete; use `*` to delete all data streams + +|=== + === indices.freeze [source,ts] @@ -7185,6 +7159,22 @@ _Default:_ `closed` |=== +=== indices.getDataStream + +[source,ts] +---- +client.indices.getDataStream({ + name: string | string[] +}) +---- +link:{ref}/data-streams.html[Documentation] + +[cols=2*] +|=== +|`name` +|`string \| string[]` - A comma-separated list of data streams to get; use `*` to get all data streams + +|=== + === indices.reloadSearchAnalyzers [source,ts] diff --git a/index.d.ts b/index.d.ts index 90ddacfb9..7683f9de1 100644 --- a/index.d.ts +++ b/index.d.ts @@ -458,14 +458,14 @@ declare class Client { deleteVotingConfigExclusions, TContext = Context>(callback: callbackFn): TransportRequestCallback deleteVotingConfigExclusions, TContext = Context>(params: RequestParams.ClusterDeleteVotingConfigExclusions, callback: callbackFn): TransportRequestCallback deleteVotingConfigExclusions, TContext = Context>(params: RequestParams.ClusterDeleteVotingConfigExclusions, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - exists_component_template, TContext = Context>(params?: RequestParams.ClusterExistsComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise> - exists_component_template, TContext = Context>(callback: callbackFn): TransportRequestCallback - exists_component_template, TContext = Context>(params: RequestParams.ClusterExistsComponentTemplate, callback: callbackFn): TransportRequestCallback - exists_component_template, TContext = Context>(params: RequestParams.ClusterExistsComponentTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - existsComponentTemplate, TContext = Context>(params?: RequestParams.ClusterExistsComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise> - existsComponentTemplate, TContext = Context>(callback: callbackFn): TransportRequestCallback - existsComponentTemplate, TContext = Context>(params: RequestParams.ClusterExistsComponentTemplate, callback: callbackFn): TransportRequestCallback - existsComponentTemplate, TContext = Context>(params: RequestParams.ClusterExistsComponentTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + exists_component_template(params?: RequestParams.ClusterExistsComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise> + exists_component_template(callback: callbackFn): TransportRequestCallback + exists_component_template(params: RequestParams.ClusterExistsComponentTemplate, callback: callbackFn): TransportRequestCallback + exists_component_template(params: RequestParams.ClusterExistsComponentTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + existsComponentTemplate(params?: RequestParams.ClusterExistsComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise> + existsComponentTemplate(callback: callbackFn): TransportRequestCallback + existsComponentTemplate(params: RequestParams.ClusterExistsComponentTemplate, callback: callbackFn): TransportRequestCallback + existsComponentTemplate(params: RequestParams.ClusterExistsComponentTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback get_component_template, TContext = Context>(params?: RequestParams.ClusterGetComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise> get_component_template, TContext = Context>(callback: callbackFn): TransportRequestCallback get_component_template, TContext = Context>(params: RequestParams.ClusterGetComponentTemplate, callback: callbackFn): TransportRequestCallback @@ -679,18 +679,18 @@ declare class Client { search, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.EqlSearch, callback: callbackFn): TransportRequestCallback search, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.EqlSearch, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback } - exists, TContext = Context>(params?: RequestParams.Exists, options?: TransportRequestOptions): TransportRequestPromise> - exists, TContext = Context>(callback: callbackFn): TransportRequestCallback - exists, TContext = Context>(params: RequestParams.Exists, callback: callbackFn): TransportRequestCallback - exists, TContext = Context>(params: RequestParams.Exists, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - exists_source, TContext = Context>(params?: RequestParams.ExistsSource, options?: TransportRequestOptions): TransportRequestPromise> - exists_source, TContext = Context>(callback: callbackFn): TransportRequestCallback - exists_source, TContext = Context>(params: RequestParams.ExistsSource, callback: callbackFn): TransportRequestCallback - exists_source, TContext = Context>(params: RequestParams.ExistsSource, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - existsSource, TContext = Context>(params?: RequestParams.ExistsSource, options?: TransportRequestOptions): TransportRequestPromise> - existsSource, TContext = Context>(callback: callbackFn): TransportRequestCallback - existsSource, TContext = Context>(params: RequestParams.ExistsSource, callback: callbackFn): TransportRequestCallback - existsSource, TContext = Context>(params: RequestParams.ExistsSource, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + exists(params?: RequestParams.Exists, options?: TransportRequestOptions): TransportRequestPromise> + exists(callback: callbackFn): TransportRequestCallback + exists(params: RequestParams.Exists, callback: callbackFn): TransportRequestCallback + exists(params: RequestParams.Exists, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + exists_source(params?: RequestParams.ExistsSource, options?: TransportRequestOptions): TransportRequestPromise> + exists_source(callback: callbackFn): TransportRequestCallback + exists_source(params: RequestParams.ExistsSource, callback: callbackFn): TransportRequestCallback + exists_source(params: RequestParams.ExistsSource, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + existsSource(params?: RequestParams.ExistsSource, options?: TransportRequestOptions): TransportRequestPromise> + existsSource(callback: callbackFn): TransportRequestCallback + existsSource(params: RequestParams.ExistsSource, callback: callbackFn): TransportRequestCallback + existsSource(params: RequestParams.ExistsSource, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback explain, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.Explain, options?: TransportRequestOptions): TransportRequestPromise> explain, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback explain, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.Explain, callback: callbackFn): TransportRequestCallback @@ -904,42 +904,42 @@ declare class Client { deleteTemplate, TContext = Context>(callback: callbackFn): TransportRequestCallback deleteTemplate, TContext = Context>(params: RequestParams.IndicesDeleteTemplate, callback: callbackFn): TransportRequestCallback deleteTemplate, TContext = Context>(params: RequestParams.IndicesDeleteTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - exists, TContext = Context>(params?: RequestParams.IndicesExists, options?: TransportRequestOptions): TransportRequestPromise> - exists, TContext = Context>(callback: callbackFn): TransportRequestCallback - exists, TContext = Context>(params: RequestParams.IndicesExists, callback: callbackFn): TransportRequestCallback - exists, TContext = Context>(params: RequestParams.IndicesExists, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - exists_alias, TContext = Context>(params?: RequestParams.IndicesExistsAlias, options?: TransportRequestOptions): TransportRequestPromise> - exists_alias, TContext = Context>(callback: callbackFn): TransportRequestCallback - exists_alias, TContext = Context>(params: RequestParams.IndicesExistsAlias, callback: callbackFn): TransportRequestCallback - exists_alias, TContext = Context>(params: RequestParams.IndicesExistsAlias, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - existsAlias, TContext = Context>(params?: RequestParams.IndicesExistsAlias, options?: TransportRequestOptions): TransportRequestPromise> - existsAlias, TContext = Context>(callback: callbackFn): TransportRequestCallback - existsAlias, TContext = Context>(params: RequestParams.IndicesExistsAlias, callback: callbackFn): TransportRequestCallback - existsAlias, TContext = Context>(params: RequestParams.IndicesExistsAlias, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - exists_index_template, TContext = Context>(params?: RequestParams.IndicesExistsIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise> - exists_index_template, TContext = Context>(callback: callbackFn): TransportRequestCallback - exists_index_template, TContext = Context>(params: RequestParams.IndicesExistsIndexTemplate, callback: callbackFn): TransportRequestCallback - exists_index_template, TContext = Context>(params: RequestParams.IndicesExistsIndexTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - existsIndexTemplate, TContext = Context>(params?: RequestParams.IndicesExistsIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise> - existsIndexTemplate, TContext = Context>(callback: callbackFn): TransportRequestCallback - existsIndexTemplate, TContext = Context>(params: RequestParams.IndicesExistsIndexTemplate, callback: callbackFn): TransportRequestCallback - existsIndexTemplate, TContext = Context>(params: RequestParams.IndicesExistsIndexTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - exists_template, TContext = Context>(params?: RequestParams.IndicesExistsTemplate, options?: TransportRequestOptions): TransportRequestPromise> - exists_template, TContext = Context>(callback: callbackFn): TransportRequestCallback - exists_template, TContext = Context>(params: RequestParams.IndicesExistsTemplate, callback: callbackFn): TransportRequestCallback - exists_template, TContext = Context>(params: RequestParams.IndicesExistsTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - existsTemplate, TContext = Context>(params?: RequestParams.IndicesExistsTemplate, options?: TransportRequestOptions): TransportRequestPromise> - existsTemplate, TContext = Context>(callback: callbackFn): TransportRequestCallback - existsTemplate, TContext = Context>(params: RequestParams.IndicesExistsTemplate, callback: callbackFn): TransportRequestCallback - existsTemplate, TContext = Context>(params: RequestParams.IndicesExistsTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - exists_type, TContext = Context>(params?: RequestParams.IndicesExistsType, options?: TransportRequestOptions): TransportRequestPromise> - exists_type, TContext = Context>(callback: callbackFn): TransportRequestCallback - exists_type, TContext = Context>(params: RequestParams.IndicesExistsType, callback: callbackFn): TransportRequestCallback - exists_type, TContext = Context>(params: RequestParams.IndicesExistsType, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - existsType, TContext = Context>(params?: RequestParams.IndicesExistsType, options?: TransportRequestOptions): TransportRequestPromise> - existsType, TContext = Context>(callback: callbackFn): TransportRequestCallback - existsType, TContext = Context>(params: RequestParams.IndicesExistsType, callback: callbackFn): TransportRequestCallback - existsType, TContext = Context>(params: RequestParams.IndicesExistsType, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + exists(params?: RequestParams.IndicesExists, options?: TransportRequestOptions): TransportRequestPromise> + exists(callback: callbackFn): TransportRequestCallback + exists(params: RequestParams.IndicesExists, callback: callbackFn): TransportRequestCallback + exists(params: RequestParams.IndicesExists, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + exists_alias(params?: RequestParams.IndicesExistsAlias, options?: TransportRequestOptions): TransportRequestPromise> + exists_alias(callback: callbackFn): TransportRequestCallback + exists_alias(params: RequestParams.IndicesExistsAlias, callback: callbackFn): TransportRequestCallback + exists_alias(params: RequestParams.IndicesExistsAlias, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + existsAlias(params?: RequestParams.IndicesExistsAlias, options?: TransportRequestOptions): TransportRequestPromise> + existsAlias(callback: callbackFn): TransportRequestCallback + existsAlias(params: RequestParams.IndicesExistsAlias, callback: callbackFn): TransportRequestCallback + existsAlias(params: RequestParams.IndicesExistsAlias, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + exists_index_template(params?: RequestParams.IndicesExistsIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise> + exists_index_template(callback: callbackFn): TransportRequestCallback + exists_index_template(params: RequestParams.IndicesExistsIndexTemplate, callback: callbackFn): TransportRequestCallback + exists_index_template(params: RequestParams.IndicesExistsIndexTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + existsIndexTemplate(params?: RequestParams.IndicesExistsIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise> + existsIndexTemplate(callback: callbackFn): TransportRequestCallback + existsIndexTemplate(params: RequestParams.IndicesExistsIndexTemplate, callback: callbackFn): TransportRequestCallback + existsIndexTemplate(params: RequestParams.IndicesExistsIndexTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + exists_template(params?: RequestParams.IndicesExistsTemplate, options?: TransportRequestOptions): TransportRequestPromise> + exists_template(callback: callbackFn): TransportRequestCallback + exists_template(params: RequestParams.IndicesExistsTemplate, callback: callbackFn): TransportRequestCallback + exists_template(params: RequestParams.IndicesExistsTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + existsTemplate(params?: RequestParams.IndicesExistsTemplate, options?: TransportRequestOptions): TransportRequestPromise> + existsTemplate(callback: callbackFn): TransportRequestCallback + existsTemplate(params: RequestParams.IndicesExistsTemplate, callback: callbackFn): TransportRequestCallback + existsTemplate(params: RequestParams.IndicesExistsTemplate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + exists_type(params?: RequestParams.IndicesExistsType, options?: TransportRequestOptions): TransportRequestPromise> + exists_type(callback: callbackFn): TransportRequestCallback + exists_type(params: RequestParams.IndicesExistsType, callback: callbackFn): TransportRequestCallback + exists_type(params: RequestParams.IndicesExistsType, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + existsType(params?: RequestParams.IndicesExistsType, options?: TransportRequestOptions): TransportRequestPromise> + existsType(callback: callbackFn): TransportRequestCallback + existsType(params: RequestParams.IndicesExistsType, callback: callbackFn): TransportRequestCallback + existsType(params: RequestParams.IndicesExistsType, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback flush, TContext = Context>(params?: RequestParams.IndicesFlush, options?: TransportRequestOptions): TransportRequestPromise> flush, TContext = Context>(callback: callbackFn): TransportRequestCallback flush, TContext = Context>(params: RequestParams.IndicesFlush, callback: callbackFn): TransportRequestCallback @@ -1785,10 +1785,10 @@ declare class Client { usage, TContext = Context>(params: RequestParams.NodesUsage, callback: callbackFn): TransportRequestCallback usage, TContext = Context>(params: RequestParams.NodesUsage, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback } - ping, TContext = Context>(params?: RequestParams.Ping, options?: TransportRequestOptions): TransportRequestPromise> - ping, TContext = Context>(callback: callbackFn): TransportRequestCallback - ping, TContext = Context>(params: RequestParams.Ping, callback: callbackFn): TransportRequestCallback - ping, TContext = Context>(params: RequestParams.Ping, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + ping(params?: RequestParams.Ping, options?: TransportRequestOptions): TransportRequestPromise> + ping(callback: callbackFn): TransportRequestCallback + ping(params: RequestParams.Ping, callback: callbackFn): TransportRequestCallback + ping(params: RequestParams.Ping, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback put_script, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.PutScript, options?: TransportRequestOptions): TransportRequestPromise> put_script, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback put_script, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.PutScript, callback: callbackFn): TransportRequestCallback From 7749c6f84a4fc690ffdca4dcb04d6435d0f12b74 Mon Sep 17 00:00:00 2001 From: Tomas Della Vedova Date: Wed, 19 Aug 2020 17:58:14 +0200 Subject: [PATCH 5/8] Changelog for 7.9 (#1261) --- docs/changelog.asciidoc | 97 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/docs/changelog.asciidoc b/docs/changelog.asciidoc index 280b0f33c..a9d631d46 100644 --- a/docs/changelog.asciidoc +++ b/docs/changelog.asciidoc @@ -1,6 +1,103 @@ [[changelog-client]] == Changelog +=== 7.9.0 + +==== Features + +===== Add ability to disable the http agent https://github.com/elastic/elasticsearch-js/pull/1251[#1251] + +If needed, the http agent can be disabled by setting it to `false` + +[source,js] +---- +const { Client } = require('@elastic/elasticsearch') +const client = new Client({ + node: 'http://localhost:9200'. + agent: false +}) +---- + +===== Add support for a global context option https://github.com/elastic/elasticsearch-js/pull/1256[#1256] + +Before this, you could set a `context` option in each request, but there was no way of setting it globally. +Now you can by configuring the `context` object in the global configuration, that will be merged with the local one. + +[source,js] +---- +const { Client } = require('@elastic/elasticsearch') +const client = new Client({ + node: 'http://localhost:9200'. + context: { meta: 'data' } +}) +---- + +===== ESM support https://github.com/elastic/elasticsearch-js/pull/1235[#1235] + +If you are using ES Modules, now you can easily import the client! + +[source,js] +---- +import { Client } from '@elastic/elasticsearch' +---- + +==== Fixes + +===== Allow the client name to be a symbol https://github.com/elastic/elasticsearch-js/pull/1254[#1254] + +It was possible in plain JavaScript, but not in TypeScript, now you can do it in TypeScript as well. + +[source,js] +---- +const { Client } = require('@elastic/elasticsearch') +const client = new Client({ + node: 'http://localhost:9200', + name: Symbol('unique') +}) +---- + +===== Fixed transport.request querystring type https://github.com/elastic/elasticsearch-js/pull/1240[#1240] + +Only `Record` was allowed. Now `string` is allowed as well. + +===== Fixed type definitions https://github.com/elastic/elasticsearch-js/pull/1263[#1263] + +* The `transport.request` defintion was incorrect, it was returning a `Promise` instead of `TransportRequestPromise`. +* The `refresh` parameter of most APIs was declared as `'true' | 'false' | 'wait_for'`, which was clunky. Now is `'wait_for' | boolean`. + +===== Generate response type as boolean if the request is HEAD only https://github.com/elastic/elasticsearch-js/pull/1275[#1275] + +All HEAD request will have the body casted to a boolean value, `true` in case of a 200 response, `false` in case of +a 404 response. The type definitions were not reflecting this behavior. + +[source,ts] +---- +import { Client } from '@elastic/elasticsearch' +const client = new Client({ + node: 'http://localhost:9200' +}) + +const { body } = await client.exist({ index: 'my-index', id: 'my-id' }) +console.log(body) // either `true` or `false` +---- + +==== Internals + +===== Updated default http agent configuration https://github.com/elastic/elasticsearch-js/pull/1242[#1242] + +Added the scheduling: 'lifo' option to the default HTTP agent configuration to avoid maximizing the open sockets +against Elasticsearch and lowering the risk of encountering socket timeouts. +This feature is only available from Node v14.5+, but it should be backported to v10 and v12. (https://github.com/nodejs/node/pull/33278[nodejs/node#33278]) + +===== Improve child API https://github.com/elastic/elasticsearch-js/pull/1245[#1245] + +This pr introduce two changes which should not impact the surface API: + +* Refactored the `client.child` API to allocate fewer objects, this change improves memory consumption over time +and improves the child creation performances by ~12%. +* The client no longer inherits from the EventEmitter class, but instead has an internal event emitter and exposes +only the API useful for the users, namely `emit, `on`, `once`, and `off`. The type definitions have been updated accordingly. + === 7.8.0 ==== Features From 6d26647cdc505794d27b2a6c78987d4a18dbf34e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2020 12:17:15 +0200 Subject: [PATCH 6/8] [Backport 7.x] Updated run-elasticsearch.sh to retry on docker network failures (#1294) Co-authored-by: Tomas Della Vedova --- .ci/run-elasticsearch.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.ci/run-elasticsearch.sh b/.ci/run-elasticsearch.sh index f9d13906a..91a11027a 100755 --- a/.ci/run-elasticsearch.sh +++ b/.ci/run-elasticsearch.sh @@ -7,13 +7,14 @@ # Export the TEST_SUITE variable, eg. 'oss' or 'xpack' defaults to 'oss'. # Export the NUMBER_OF_NODES variable to start more than 1 node -# Version 1.1.0 +# Version 1.2.0 # - Initial version of the run-elasticsearch.sh script # - Deleting the volume should not dependent on the container still running # - Fixed `ES_JAVA_OPTS` config # - Moved to STACK_VERSION and TEST_VERSION # - Refactored into functions and imports # - Support NUMBER_OF_NODES +# - Added 5 retries on docker pull for fixing transient network errors script_path=$(dirname $(realpath -s $0)) source $script_path/functions/imports.sh @@ -67,6 +68,17 @@ if [[ "$TEST_SUITE" == "xpack" ]]; then cert_validation_flags="--insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name}:443:127.0.0.1" fi +# Pull the container, retry on failures up to 5 times with +# short delays between each attempt. Fixes most transient network errors. +docker_pull_attempts=0 +until [ "$docker_pull_attempts" -ge 5 ] +do + docker pull docker.elastic.co/elasticsearch/"$elasticsearch_container" && break + docker_pull_attempts=$((docker_pull_attempts+1)) + echo "Failed to pull image, retrying in 10 seconds (retry $docker_pull_attempts/5)..." + sleep 10 +done + NUMBER_OF_NODES=${NUMBER_OF_NODES-1} http_port=9200 for (( i=0; i<$NUMBER_OF_NODES; i++, http_port++ )); do From 00aeb8b92342bfd91921b1d57f29277d31b8f8d3 Mon Sep 17 00:00:00 2001 From: Renato Date: Tue, 1 Sep 2020 07:15:11 -0300 Subject: [PATCH 7/8] Helper param fix (#1284) Co-authored-by: Tomas Della Vedova --- lib/Helpers.js | 7 +-- test/unit/helpers/scroll.test.js | 92 ++++++++++++++++++++++++++++++-- 2 files changed, 92 insertions(+), 7 deletions(-) diff --git a/lib/Helpers.js b/lib/Helpers.js index b505a0ce9..ac8509764 100644 --- a/lib/Helpers.js +++ b/lib/Helpers.js @@ -84,7 +84,7 @@ class Helpers { const { method, body, index, ...querystring } = params let response = null - for (let i = 0; i < maxRetries; i++) { + for (let i = 0; i <= maxRetries; i++) { response = await this[kClient].search(params, options) if (response.statusCode !== 429) break await sleep(wait) @@ -114,9 +114,10 @@ class Helpers { break } - for (let i = 0; i < maxRetries; i++) { + for (let i = 0; i <= maxRetries; i++) { response = await this[kClient].scroll({ - ...querystring, + scroll: querystring.scroll, + rest_total_hits_as_int: querystring.rest_total_hits_as_int || querystring.restTotalHitsAsInt, body: { scroll_id } }, options) if (response.statusCode !== 429) break diff --git a/test/unit/helpers/scroll.test.js b/test/unit/helpers/scroll.test.js index c4ef16168..cfa26c969 100644 --- a/test/unit/helpers/scroll.test.js +++ b/test/unit/helpers/scroll.test.js @@ -161,6 +161,8 @@ test('Scroll search (retry)', async t => { }) test('Scroll search (retry throws and maxRetries)', async t => { + const maxRetries = 5 + const expectedAttempts = maxRetries + 1 var count = 0 const MockConnection = connection.buildMockConnection({ onRequest (params) { @@ -172,7 +174,7 @@ test('Scroll search (retry throws and maxRetries)', async t => { const client = new Client({ node: 'http://localhost:9200', Connection: MockConnection, - maxRetries: 5 + maxRetries }) const scrollSearch = client.helpers.scrollSearch({ @@ -190,11 +192,13 @@ test('Scroll search (retry throws and maxRetries)', async t => { } catch (err) { t.true(err instanceof errors.ResponseError) t.strictEqual(err.statusCode, 429) - t.strictEqual(count, 5) + t.strictEqual(count, expectedAttempts) } }) test('Scroll search (retry throws later)', async t => { + const maxRetries = 5 + const expectedAttempts = maxRetries + 1 var count = 0 const MockConnection = connection.buildMockConnection({ onRequest (params) { @@ -241,7 +245,7 @@ test('Scroll search (retry throws later)', async t => { } catch (err) { t.true(err instanceof errors.ResponseError) t.strictEqual(err.statusCode, 429) - t.strictEqual(count, 5) + t.strictEqual(count, expectedAttempts) } }) @@ -249,7 +253,12 @@ test('Scroll search documents', async t => { var count = 0 const MockConnection = connection.buildMockConnection({ onRequest (params) { - t.strictEqual(params.querystring, 'filter_path=hits.hits._source%2C_scroll_id&scroll=1m') + if (count === 0) { + t.strictEqual(params.querystring, 'filter_path=hits.hits._source%2C_scroll_id&scroll=1m') + } else { + t.strictEqual(params.querystring, 'scroll=1m') + t.strictEqual(params.body, '{"scroll_id":"id"}') + } return { body: { _scroll_id: count === 3 ? undefined : 'id', @@ -286,3 +295,78 @@ test('Scroll search documents', async t => { } } }) + +test('Should not retry if maxRetries = 0', async t => { + const maxRetries = 0 + const expectedAttempts = 1 + var count = 0 + const MockConnection = connection.buildMockConnection({ + onRequest (params) { + count += 1 + return { body: {}, statusCode: 429 } + } + }) + + const client = new Client({ + node: 'http://localhost:9200', + Connection: MockConnection, + maxRetries + }) + + const scrollSearch = client.helpers.scrollSearch({ + index: 'test', + body: { foo: 'bar' } + }, { + wait: 10, + ignore: [404] + }) + + try { + for await (const result of scrollSearch) { // eslint-disable-line + t.fail('we should not be here') + } + } catch (err) { + t.true(err instanceof errors.ResponseError) + t.strictEqual(err.statusCode, 429) + t.strictEqual(count, expectedAttempts) + } +}) + +test('Fix querystring for scroll search', async t => { + var count = 0 + const MockConnection = connection.buildMockConnection({ + onRequest (params) { + if (count === 0) { + t.strictEqual(params.querystring, 'size=1&scroll=1m') + } else { + t.strictEqual(params.querystring, 'scroll=1m') + } + return { + body: { + _scroll_id: count === 3 ? undefined : 'id', + hits: { + hits: [ + { _source: { val: count } } + ] + } + } + } + } + }) + + const client = new Client({ + node: 'http://localhost:9200', + Connection: MockConnection + }) + + const scrollSearch = client.helpers.scrollSearch({ + index: 'test', + size: 1, + body: { foo: 'bar' } + }) + + for await (const response of scrollSearch) { + t.strictEqual(response.body.hits.hits.length, 1) + count += 1 + } +}) From 7a407c411d5dcbb1a83f4dd6d71fb57118819e08 Mon Sep 17 00:00:00 2001 From: delvedor Date: Tue, 1 Sep 2020 14:10:26 +0200 Subject: [PATCH 8/8] API generation --- api/api/cat.ml_datafeeds.js | 2 + api/api/cat.ml_jobs.js | 2 + api/api/indices.add_block.js | 2 +- api/api/indices.create_data_stream.js | 2 +- api/api/indices.flush_synced.js | 9 +-- api/api/indices.resolve_index.js | 2 +- api/api/ml.close_job.js | 2 + api/api/ml.get_datafeed_stats.js | 2 + api/api/ml.get_datafeeds.js | 2 + api/api/ml.get_job_stats.js | 2 + api/api/ml.get_jobs.js | 2 + api/api/ml.get_overall_buckets.js | 2 + api/api/ml.stop_datafeed.js | 2 + api/kibana.d.ts | 4 +- api/requestParams.d.ts | 15 ++++- docs/reference.asciidoc | 88 +++++++++++++++++++++------ index.d.ts | 32 +++++----- 17 files changed, 124 insertions(+), 48 deletions(-) diff --git a/api/api/cat.ml_datafeeds.js b/api/api/cat.ml_datafeeds.js index 5d10b0c7f..4475a1d77 100644 --- a/api/api/cat.ml_datafeeds.js +++ b/api/api/cat.ml_datafeeds.js @@ -27,6 +27,7 @@ function buildCatMlDatafeeds (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'allow_no_match', 'allow_no_datafeeds', 'format', 'h', @@ -37,6 +38,7 @@ function buildCatMlDatafeeds (opts) { ] const snakeCase = { + allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds' } diff --git a/api/api/cat.ml_jobs.js b/api/api/cat.ml_jobs.js index b8048ead8..25ed055c0 100644 --- a/api/api/cat.ml_jobs.js +++ b/api/api/cat.ml_jobs.js @@ -27,6 +27,7 @@ function buildCatMlJobs (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'allow_no_match', 'allow_no_jobs', 'bytes', 'format', @@ -38,6 +39,7 @@ function buildCatMlJobs (opts) { ] const snakeCase = { + allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs' } diff --git a/api/api/indices.add_block.js b/api/api/indices.add_block.js index 32f9fa9d2..2adea3b83 100644 --- a/api/api/indices.add_block.js +++ b/api/api/indices.add_block.js @@ -51,7 +51,7 @@ function buildIndicesAddBlock (opts) { /** * Perform a indices.add_block request * Adds a block to an index. - * https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-blocks.html + * https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html */ return function indicesAddBlock (params, options, callback) { options = options || {} diff --git a/api/api/indices.create_data_stream.js b/api/api/indices.create_data_stream.js index ed319d7dd..c83938c27 100644 --- a/api/api/indices.create_data_stream.js +++ b/api/api/indices.create_data_stream.js @@ -36,7 +36,7 @@ function buildIndicesCreateDataStream (opts) { /** * Perform a indices.create_data_stream request - * Creates or updates a data stream + * Creates a data stream * https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html */ return function indicesCreateDataStream (params, options, callback) { diff --git a/api/api/indices.flush_synced.js b/api/api/indices.flush_synced.js index c92e4a483..e3240f387 100644 --- a/api/api/indices.flush_synced.js +++ b/api/api/indices.flush_synced.js @@ -79,13 +79,8 @@ function buildIndicesFlushSynced (opts) { var path = '' - if ((index) != null) { - if (method == null) method = body == null ? 'GET' : 'POST' - path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced' - } else { - if (method == null) method = body == null ? 'GET' : 'POST' - path = '/' + '_flush' + '/' + 'synced' - } + if (method == null) method = body == null ? 'GET' : 'POST' + path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced' // build request object const request = { diff --git a/api/api/indices.resolve_index.js b/api/api/indices.resolve_index.js index db096a4db..f5b31cb7a 100644 --- a/api/api/indices.resolve_index.js +++ b/api/api/indices.resolve_index.js @@ -44,7 +44,7 @@ function buildIndicesResolveIndex (opts) { /** * Perform a indices.resolve_index request * Returns information about any matching indices, aliases, and data streams - * https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index.html + * https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html */ return function indicesResolveIndex (params, options, callback) { options = options || {} diff --git a/api/api/ml.close_job.js b/api/api/ml.close_job.js index d2e05a477..b1d961cf6 100644 --- a/api/api/ml.close_job.js +++ b/api/api/ml.close_job.js @@ -27,12 +27,14 @@ function buildMlCloseJob (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'allow_no_match', 'allow_no_jobs', 'force', 'timeout' ] const snakeCase = { + allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs' } diff --git a/api/api/ml.get_datafeed_stats.js b/api/api/ml.get_datafeed_stats.js index 3de9c923f..0c38f8c14 100644 --- a/api/api/ml.get_datafeed_stats.js +++ b/api/api/ml.get_datafeed_stats.js @@ -27,10 +27,12 @@ function buildMlGetDatafeedStats (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'allow_no_match', 'allow_no_datafeeds' ] const snakeCase = { + allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds' } diff --git a/api/api/ml.get_datafeeds.js b/api/api/ml.get_datafeeds.js index e48032e46..e3bde8f09 100644 --- a/api/api/ml.get_datafeeds.js +++ b/api/api/ml.get_datafeeds.js @@ -27,10 +27,12 @@ function buildMlGetDatafeeds (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'allow_no_match', 'allow_no_datafeeds' ] const snakeCase = { + allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds' } diff --git a/api/api/ml.get_job_stats.js b/api/api/ml.get_job_stats.js index f79137413..10759b68b 100644 --- a/api/api/ml.get_job_stats.js +++ b/api/api/ml.get_job_stats.js @@ -27,10 +27,12 @@ function buildMlGetJobStats (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'allow_no_match', 'allow_no_jobs' ] const snakeCase = { + allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs' } diff --git a/api/api/ml.get_jobs.js b/api/api/ml.get_jobs.js index bf765da73..d49486d0c 100644 --- a/api/api/ml.get_jobs.js +++ b/api/api/ml.get_jobs.js @@ -27,10 +27,12 @@ function buildMlGetJobs (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'allow_no_match', 'allow_no_jobs' ] const snakeCase = { + allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs' } diff --git a/api/api/ml.get_overall_buckets.js b/api/api/ml.get_overall_buckets.js index c918d7710..9b40879d0 100644 --- a/api/api/ml.get_overall_buckets.js +++ b/api/api/ml.get_overall_buckets.js @@ -33,6 +33,7 @@ function buildMlGetOverallBuckets (opts) { 'exclude_interim', 'start', 'end', + 'allow_no_match', 'allow_no_jobs' ] @@ -41,6 +42,7 @@ function buildMlGetOverallBuckets (opts) { bucketSpan: 'bucket_span', overallScore: 'overall_score', excludeInterim: 'exclude_interim', + allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs' } diff --git a/api/api/ml.stop_datafeed.js b/api/api/ml.stop_datafeed.js index c479cbe8f..022be927b 100644 --- a/api/api/ml.stop_datafeed.js +++ b/api/api/ml.stop_datafeed.js @@ -27,12 +27,14 @@ function buildMlStopDatafeed (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'allow_no_match', 'allow_no_datafeeds', 'force', 'timeout' ] const snakeCase = { + allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds' } diff --git a/api/kibana.d.ts b/api/kibana.d.ts index 12f7cf561..e87f44b2f 100644 --- a/api/kibana.d.ts +++ b/api/kibana.d.ts @@ -202,7 +202,7 @@ interface KibanaClient { clone, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesClone, options?: TransportRequestOptions): TransportRequestPromise> close, TContext = Context>(params?: RequestParams.IndicesClose, options?: TransportRequestOptions): TransportRequestPromise> create, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesCreate, options?: TransportRequestOptions): TransportRequestPromise> - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> + createDataStream, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> dataStreamsStats, TContext = Context>(params?: RequestParams.IndicesDataStreamsStats, options?: TransportRequestOptions): TransportRequestPromise> delete, TContext = Context>(params?: RequestParams.IndicesDelete, options?: TransportRequestOptions): TransportRequestPromise> deleteAlias, TContext = Context>(params?: RequestParams.IndicesDeleteAlias, options?: TransportRequestOptions): TransportRequestPromise> @@ -324,7 +324,7 @@ interface KibanaClient { startDataFrameAnalytics, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlStartDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise> startDatafeed, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlStartDatafeed, options?: TransportRequestOptions): TransportRequestPromise> stopDataFrameAnalytics, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlStopDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise> - stopDatafeed, TContext = Context>(params?: RequestParams.MlStopDatafeed, options?: TransportRequestOptions): TransportRequestPromise> + stopDatafeed, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlStopDatafeed, options?: TransportRequestOptions): TransportRequestPromise> updateDataFrameAnalytics, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlUpdateDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise> updateDatafeed, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlUpdateDatafeed, options?: TransportRequestOptions): TransportRequestPromise> updateFilter, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlUpdateFilter, options?: TransportRequestOptions): TransportRequestPromise> diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 520c01aad..25306c583 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -1552,6 +1552,7 @@ export interface CatMlDataFrameAnalytics extends Generic { export interface CatMlDatafeeds extends Generic { datafeed_id?: string; + allow_no_match?: boolean; allow_no_datafeeds?: boolean; format?: string; h?: string | string[]; @@ -1563,6 +1564,7 @@ export interface CatMlDatafeeds extends Generic { export interface CatMlJobs extends Generic { job_id?: string; + allow_no_match?: boolean; allow_no_jobs?: boolean; bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; format?: string; @@ -1744,9 +1746,8 @@ export interface IlmStart extends Generic { export interface IlmStop extends Generic { } -export interface IndicesCreateDataStream extends Generic { +export interface IndicesCreateDataStream extends Generic { name: string; - body?: T; } export interface IndicesDataStreamsStats extends Generic { @@ -1822,6 +1823,7 @@ export interface MigrationDeprecations extends Generic { export interface MlCloseJob extends Generic { job_id: string; + allow_no_match?: boolean; allow_no_jobs?: boolean; force?: boolean; timeout?: string; @@ -1991,11 +1993,13 @@ export interface MlGetDataFrameAnalyticsStats extends Generic { export interface MlGetDatafeedStats extends Generic { datafeed_id?: string; + allow_no_match?: boolean; allow_no_datafeeds?: boolean; } export interface MlGetDatafeeds extends Generic { datafeed_id?: string; + allow_no_match?: boolean; allow_no_datafeeds?: boolean; } @@ -2020,11 +2024,13 @@ export interface MlGetInfluencers extends Generic { export interface MlGetJobStats extends Generic { job_id?: string; + allow_no_match?: boolean; allow_no_jobs?: boolean; } export interface MlGetJobs extends Generic { job_id?: string; + allow_no_match?: boolean; allow_no_jobs?: boolean; } @@ -2048,6 +2054,7 @@ export interface MlGetOverallBuckets extends Generic { exclude_interim?: boolean; start?: string; end?: string; + allow_no_match?: boolean; allow_no_jobs?: boolean; body?: T; } @@ -2179,11 +2186,13 @@ export interface MlStopDataFrameAnalytics extends Generic { body?: T; } -export interface MlStopDatafeed extends Generic { +export interface MlStopDatafeed extends Generic { datafeed_id: string; + allow_no_match?: boolean; allow_no_datafeeds?: boolean; force?: boolean; timeout?: string; + body?: T; } export interface MlUpdateDataFrameAnalytics extends Generic { diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 91c2e331f..02711ad7f 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -2481,7 +2481,7 @@ client.indices.addBlock({ expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all' }) ---- - +link:{ref}/index-modules-blocks.html[Documentation] + [cols=2*] |=== |`index` @@ -3708,7 +3708,7 @@ client.indices.resolveIndex({ expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all' }) ---- - +link:{ref}/indices-resolve-index-api.html[Documentation] + [cols=2*] |=== |`name` @@ -6303,6 +6303,7 @@ link:{ref}/cat-dfanalytics.html[Documentation] + ---- client.cat.mlDatafeeds({ datafeed_id: string, + allow_no_match: boolean, allow_no_datafeeds: boolean, format: string, h: string | string[], @@ -6318,9 +6319,14 @@ link:{ref}/cat-datafeeds.html[Documentation] + |`datafeed_id` or `datafeedId` |`string` - The ID of the datafeeds stats to fetch -|`allow_no_datafeeds` or `allowNoDatafeeds` +|`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) +|`allow_no_datafeeds` or `allowNoDatafeeds` +|`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + + +WARNING: This parameter has been deprecated. + |`format` |`string` - a short version of the Accept header, e.g. json, yaml @@ -6347,6 +6353,7 @@ link:{ref}/cat-datafeeds.html[Documentation] + ---- client.cat.mlJobs({ job_id: string, + allow_no_match: boolean, allow_no_jobs: boolean, bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', format: string, @@ -6363,9 +6370,14 @@ link:{ref}/cat-anomaly-detectors.html[Documentation] + |`job_id` or `jobId` |`string` - The ID of the jobs stats to fetch -|`allow_no_jobs` or `allowNoJobs` +|`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +|`allow_no_jobs` or `allowNoJobs` +|`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + + +WARNING: This parameter has been deprecated. + |`bytes` |`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values @@ -7071,8 +7083,7 @@ link:{ref}/ilm-stop.html[Documentation] + [source,ts] ---- client.indices.createDataStream({ - name: string, - body: object + name: string }) ---- link:{ref}/data-streams.html[Documentation] + @@ -7081,9 +7092,6 @@ link:{ref}/data-streams.html[Documentation] + |`name` |`string` - The name of the data stream -|`body` -|`object` - The data stream definition - |=== === indices.dataStreamsStats @@ -7370,6 +7378,7 @@ link:{ref}/migration-api-deprecation.html[Documentation] + ---- client.ml.closeJob({ job_id: string, + allow_no_match: boolean, allow_no_jobs: boolean, force: boolean, timeout: string, @@ -7382,9 +7391,14 @@ link:{ref}/ml-close-job.html[Documentation] + |`job_id` or `jobId` |`string` - The name of the job to close -|`allow_no_jobs` or `allowNoJobs` +|`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +|`allow_no_jobs` or `allowNoJobs` +|`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + + +WARNING: This parameter has been deprecated. + |`force` |`boolean` - True if the job should be forcefully closed @@ -8054,6 +8068,7 @@ _Default:_ `100` ---- client.ml.getDatafeedStats({ datafeed_id: string, + allow_no_match: boolean, allow_no_datafeeds: boolean }) ---- @@ -8063,9 +8078,14 @@ link:{ref}/ml-get-datafeed-stats.html[Documentation] + |`datafeed_id` or `datafeedId` |`string` - The ID of the datafeeds stats to fetch -|`allow_no_datafeeds` or `allowNoDatafeeds` +|`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) +|`allow_no_datafeeds` or `allowNoDatafeeds` +|`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + + +WARNING: This parameter has been deprecated. + |=== === ml.getDatafeeds @@ -8074,6 +8094,7 @@ link:{ref}/ml-get-datafeed-stats.html[Documentation] + ---- client.ml.getDatafeeds({ datafeed_id: string, + allow_no_match: boolean, allow_no_datafeeds: boolean }) ---- @@ -8083,9 +8104,14 @@ link:{ref}/ml-get-datafeed.html[Documentation] + |`datafeed_id` or `datafeedId` |`string` - The ID of the datafeeds to fetch -|`allow_no_datafeeds` or `allowNoDatafeeds` +|`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) +|`allow_no_datafeeds` or `allowNoDatafeeds` +|`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + + +WARNING: This parameter has been deprecated. + |=== === ml.getFilters @@ -8170,6 +8196,7 @@ link:{ref}/ml-get-influencer.html[Documentation] + ---- client.ml.getJobStats({ job_id: string, + allow_no_match: boolean, allow_no_jobs: boolean }) ---- @@ -8179,9 +8206,14 @@ link:{ref}/ml-get-job-stats.html[Documentation] + |`job_id` or `jobId` |`string` - The ID of the jobs stats to fetch -|`allow_no_jobs` or `allowNoJobs` +|`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +|`allow_no_jobs` or `allowNoJobs` +|`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + + +WARNING: This parameter has been deprecated. + |=== === ml.getJobs @@ -8190,6 +8222,7 @@ link:{ref}/ml-get-job-stats.html[Documentation] + ---- client.ml.getJobs({ job_id: string, + allow_no_match: boolean, allow_no_jobs: boolean }) ---- @@ -8199,9 +8232,14 @@ link:{ref}/ml-get-job.html[Documentation] + |`job_id` or `jobId` |`string` - The ID of the jobs to fetch -|`allow_no_jobs` or `allowNoJobs` +|`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +|`allow_no_jobs` or `allowNoJobs` +|`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + + +WARNING: This parameter has been deprecated. + |=== === ml.getModelSnapshots @@ -8264,6 +8302,7 @@ client.ml.getOverallBuckets({ exclude_interim: boolean, start: string, end: string, + allow_no_match: boolean, allow_no_jobs: boolean, body: object }) @@ -8292,9 +8331,14 @@ link:{ref}/ml-get-overall-buckets.html[Documentation] + |`end` |`string` - Returns overall buckets with timestamps earlier than this time -|`allow_no_jobs` or `allowNoJobs` +|`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +|`allow_no_jobs` or `allowNoJobs` +|`boolean` - Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + + +WARNING: This parameter has been deprecated. + |`body` |`object` - Overall bucket selection details if not provided in URI @@ -8816,9 +8860,11 @@ link:{ref}/stop-dfanalytics.html[Documentation] + ---- client.ml.stopDatafeed({ datafeed_id: string, + allow_no_match: boolean, allow_no_datafeeds: boolean, force: boolean, - timeout: string + timeout: string, + body: object }) ---- link:{ref}/ml-stop-datafeed.html[Documentation] + @@ -8827,15 +8873,23 @@ link:{ref}/ml-stop-datafeed.html[Documentation] + |`datafeed_id` or `datafeedId` |`string` - The ID of the datafeed to stop -|`allow_no_datafeeds` or `allowNoDatafeeds` +|`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) +|`allow_no_datafeeds` or `allowNoDatafeeds` +|`boolean` - Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + + +WARNING: This parameter has been deprecated. + |`force` |`boolean` - True if the datafeed should be forcefully stopped. |`timeout` |`string` - Controls the time to wait until a datafeed has stopped. Default to 20 seconds +|`body` +|`object` - The URL params optionally sent in the body + |=== === ml.updateDataFrameAnalytics diff --git a/index.d.ts b/index.d.ts index 7683f9de1..e4607895c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -852,14 +852,14 @@ declare class Client { create, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback create, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreate, callback: callbackFn): TransportRequestCallback create, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - create_data_stream, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> - create_data_stream, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback - create_data_stream, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreateDataStream, callback: callbackFn): TransportRequestCallback - create_data_stream, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreateDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreateDataStream, callback: callbackFn): TransportRequestCallback - createDataStream, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IndicesCreateDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + create_data_stream, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> + create_data_stream, TContext = Context>(callback: callbackFn): TransportRequestCallback + create_data_stream, TContext = Context>(params: RequestParams.IndicesCreateDataStream, callback: callbackFn): TransportRequestCallback + create_data_stream, TContext = Context>(params: RequestParams.IndicesCreateDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + createDataStream, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise> + createDataStream, TContext = Context>(callback: callbackFn): TransportRequestCallback + createDataStream, TContext = Context>(params: RequestParams.IndicesCreateDataStream, callback: callbackFn): TransportRequestCallback + createDataStream, TContext = Context>(params: RequestParams.IndicesCreateDataStream, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback data_streams_stats, TContext = Context>(params?: RequestParams.IndicesDataStreamsStats, options?: TransportRequestOptions): TransportRequestPromise> data_streams_stats, TContext = Context>(callback: callbackFn): TransportRequestCallback data_streams_stats, TContext = Context>(params: RequestParams.IndicesDataStreamsStats, callback: callbackFn): TransportRequestCallback @@ -1672,14 +1672,14 @@ declare class Client { stopDataFrameAnalytics, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback stopDataFrameAnalytics, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.MlStopDataFrameAnalytics, callback: callbackFn): TransportRequestCallback stopDataFrameAnalytics, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.MlStopDataFrameAnalytics, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - stop_datafeed, TContext = Context>(params?: RequestParams.MlStopDatafeed, options?: TransportRequestOptions): TransportRequestPromise> - stop_datafeed, TContext = Context>(callback: callbackFn): TransportRequestCallback - stop_datafeed, TContext = Context>(params: RequestParams.MlStopDatafeed, callback: callbackFn): TransportRequestCallback - stop_datafeed, TContext = Context>(params: RequestParams.MlStopDatafeed, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - stopDatafeed, TContext = Context>(params?: RequestParams.MlStopDatafeed, options?: TransportRequestOptions): TransportRequestPromise> - stopDatafeed, TContext = Context>(callback: callbackFn): TransportRequestCallback - stopDatafeed, TContext = Context>(params: RequestParams.MlStopDatafeed, callback: callbackFn): TransportRequestCallback - stopDatafeed, TContext = Context>(params: RequestParams.MlStopDatafeed, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + stop_datafeed, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlStopDatafeed, options?: TransportRequestOptions): TransportRequestPromise> + stop_datafeed, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + stop_datafeed, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.MlStopDatafeed, callback: callbackFn): TransportRequestCallback + stop_datafeed, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.MlStopDatafeed, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + stopDatafeed, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlStopDatafeed, options?: TransportRequestOptions): TransportRequestPromise> + stopDatafeed, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + stopDatafeed, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.MlStopDatafeed, callback: callbackFn): TransportRequestCallback + stopDatafeed, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.MlStopDatafeed, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback update_data_frame_analytics, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlUpdateDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise> update_data_frame_analytics, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback update_data_frame_analytics, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.MlUpdateDataFrameAnalytics, callback: callbackFn): TransportRequestCallback