From 05276b069332ebf4ae0dfa14d2ca37500c9d81e0 Mon Sep 17 00:00:00 2001 From: Fernando Briano Date: Tue, 29 Mar 2022 10:40:50 +0100 Subject: [PATCH] [API] Updates the generated code with the new order for arguments.clone --- .../lib/elasticsearch/api/actions/async_search/delete.rb | 3 +-- .../lib/elasticsearch/api/actions/async_search/get.rb | 3 +-- .../lib/elasticsearch/api/actions/async_search/status.rb | 3 +-- .../lib/elasticsearch/api/actions/async_search/submit.rb | 5 ++--- .../api/actions/autoscaling/delete_autoscaling_policy.rb | 3 +-- .../api/actions/autoscaling/get_autoscaling_capacity.rb | 5 ++--- .../api/actions/autoscaling/get_autoscaling_policy.rb | 3 +-- .../api/actions/autoscaling/put_autoscaling_policy.rb | 3 +-- elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/aliases.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/allocation.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/count.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/fielddata.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/health.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/help.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/indices.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/master.rb | 5 ++--- .../api/actions/cat/ml_data_frame_analytics.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/ml_datafeeds.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/ml_jobs.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/ml_trained_models.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/nodeattrs.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/nodes.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/pending_tasks.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/plugins.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/recovery.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/repositories.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/segments.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/shards.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/snapshots.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/tasks.rb | 5 ++--- .../lib/elasticsearch/api/actions/cat/templates.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/thread_pool.rb | 3 +-- .../lib/elasticsearch/api/actions/cat/transforms.rb | 3 +-- .../lib/elasticsearch/api/actions/clear_scroll.rb | 3 +-- .../lib/elasticsearch/api/actions/close_point_in_time.rb | 5 ++--- .../api/actions/cluster/allocation_explain.rb | 5 ++--- .../api/actions/cluster/delete_component_template.rb | 3 +-- .../api/actions/cluster/delete_voting_config_exclusions.rb | 5 ++--- .../api/actions/cluster/exists_component_template.rb | 3 +-- .../api/actions/cluster/get_component_template.rb | 3 +-- .../lib/elasticsearch/api/actions/cluster/get_settings.rb | 5 ++--- .../lib/elasticsearch/api/actions/cluster/health.rb | 5 ++--- .../lib/elasticsearch/api/actions/cluster/pending_tasks.rb | 5 ++--- .../api/actions/cluster/post_voting_config_exclusions.rb | 5 ++--- .../api/actions/cluster/put_component_template.rb | 3 +-- .../lib/elasticsearch/api/actions/cluster/put_settings.rb | 3 +-- .../lib/elasticsearch/api/actions/cluster/remote_info.rb | 5 ++--- .../lib/elasticsearch/api/actions/cluster/reroute.rb | 3 +-- .../lib/elasticsearch/api/actions/cluster/state.rb | 3 +-- .../lib/elasticsearch/api/actions/cluster/stats.rb | 3 +-- elasticsearch-api/lib/elasticsearch/api/actions/count.rb | 5 ++--- .../delete_auto_follow_pattern.rb | 3 +-- .../api/actions/cross_cluster_replication/follow.rb | 5 ++--- .../api/actions/cross_cluster_replication/follow_info.rb | 5 ++--- .../api/actions/cross_cluster_replication/follow_stats.rb | 5 ++--- .../actions/cross_cluster_replication/forget_follower.rb | 5 ++--- .../cross_cluster_replication/get_auto_follow_pattern.rb | 3 +-- .../cross_cluster_replication/pause_auto_follow_pattern.rb | 3 +-- .../api/actions/cross_cluster_replication/pause_follow.rb | 5 ++--- .../cross_cluster_replication/put_auto_follow_pattern.rb | 3 +-- .../resume_auto_follow_pattern.rb | 3 +-- .../api/actions/cross_cluster_replication/resume_follow.rb | 5 ++--- .../api/actions/cross_cluster_replication/stats.rb | 5 ++--- .../api/actions/cross_cluster_replication/unfollow.rb | 5 ++--- .../api/actions/dangling_indices/delete_dangling_index.rb | 3 +-- .../api/actions/dangling_indices/import_dangling_index.rb | 3 +-- .../api/actions/dangling_indices/list_dangling_indices.rb | 5 ++--- elasticsearch-api/lib/elasticsearch/api/actions/delete.rb | 3 +-- .../lib/elasticsearch/api/actions/delete_by_query.rb | 5 ++--- .../api/actions/delete_by_query_rethrottle.rb | 3 +-- .../lib/elasticsearch/api/actions/delete_script.rb | 3 +-- .../lib/elasticsearch/api/actions/enrich/delete_policy.rb | 3 +-- .../lib/elasticsearch/api/actions/enrich/execute_policy.rb | 3 +-- .../lib/elasticsearch/api/actions/enrich/get_policy.rb | 3 +-- .../lib/elasticsearch/api/actions/enrich/put_policy.rb | 3 +-- .../lib/elasticsearch/api/actions/enrich/stats.rb | 5 ++--- .../lib/elasticsearch/api/actions/eql/delete.rb | 3 +-- elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb | 3 +-- .../lib/elasticsearch/api/actions/eql/get_status.rb | 3 +-- .../lib/elasticsearch/api/actions/eql/search.rb | 2 +- elasticsearch-api/lib/elasticsearch/api/actions/exists.rb | 3 +-- .../lib/elasticsearch/api/actions/exists_source.rb | 3 +-- elasticsearch-api/lib/elasticsearch/api/actions/explain.rb | 3 +-- .../lib/elasticsearch/api/actions/features/get_features.rb | 5 ++--- .../elasticsearch/api/actions/features/reset_features.rb | 5 ++--- .../lib/elasticsearch/api/actions/field_caps.rb | 5 ++--- .../elasticsearch/api/actions/fleet/global_checkpoints.rb | 5 ++--- elasticsearch-api/lib/elasticsearch/api/actions/get.rb | 3 +-- .../lib/elasticsearch/api/actions/get_script.rb | 3 +-- .../lib/elasticsearch/api/actions/get_script_context.rb | 5 ++--- .../lib/elasticsearch/api/actions/get_script_languages.rb | 5 ++--- .../lib/elasticsearch/api/actions/get_source.rb | 3 +-- .../lib/elasticsearch/api/actions/graph/explore.rb | 5 ++--- elasticsearch-api/lib/elasticsearch/api/actions/index.rb | 3 +-- .../actions/index_lifecycle_management/delete_lifecycle.rb | 3 +-- .../index_lifecycle_management/explain_lifecycle.rb | 5 ++--- .../actions/index_lifecycle_management/get_lifecycle.rb | 3 +-- .../api/actions/index_lifecycle_management/get_status.rb | 5 ++--- .../index_lifecycle_management/migrate_to_data_tiers.rb | 5 ++--- .../api/actions/index_lifecycle_management/move_to_step.rb | 5 ++--- .../actions/index_lifecycle_management/put_lifecycle.rb | 3 +-- .../actions/index_lifecycle_management/remove_policy.rb | 5 ++--- .../api/actions/index_lifecycle_management/retry.rb | 5 ++--- .../api/actions/index_lifecycle_management/start.rb | 5 ++--- .../api/actions/index_lifecycle_management/stop.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/add_block.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/analyze.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/clear_cache.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/clone.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/close.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/create.rb | 5 ++--- .../api/actions/indices/create_data_stream.rb | 3 +-- .../api/actions/indices/data_streams_stats.rb | 3 +-- .../lib/elasticsearch/api/actions/indices/delete.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/delete_alias.rb | 5 ++--- .../api/actions/indices/delete_data_stream.rb | 3 +-- .../api/actions/indices/delete_index_template.rb | 3 +-- .../elasticsearch/api/actions/indices/delete_template.rb | 3 +-- .../lib/elasticsearch/api/actions/indices/disk_usage.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/exists.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/exists_alias.rb | 3 +-- .../api/actions/indices/exists_index_template.rb | 3 +-- .../elasticsearch/api/actions/indices/exists_template.rb | 3 +-- .../elasticsearch/api/actions/indices/field_usage_stats.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/flush.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/forcemerge.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/get.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/get_alias.rb | 3 +-- .../elasticsearch/api/actions/indices/get_data_stream.rb | 3 +-- .../elasticsearch/api/actions/indices/get_field_mapping.rb | 5 ++--- .../api/actions/indices/get_index_template.rb | 3 +-- .../lib/elasticsearch/api/actions/indices/get_mapping.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/get_settings.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/get_template.rb | 3 +-- .../api/actions/indices/migrate_to_data_stream.rb | 3 +-- .../api/actions/indices/modify_data_stream.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/open.rb | 5 ++--- .../api/actions/indices/promote_data_stream.rb | 3 +-- .../lib/elasticsearch/api/actions/indices/put_alias.rb | 5 ++--- .../api/actions/indices/put_index_template.rb | 3 +-- .../lib/elasticsearch/api/actions/indices/put_mapping.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/put_settings.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/put_template.rb | 3 +-- .../lib/elasticsearch/api/actions/indices/recovery.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/refresh.rb | 5 ++--- .../api/actions/indices/reload_search_analyzers.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/resolve_index.rb | 3 +-- .../lib/elasticsearch/api/actions/indices/rollover.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/segments.rb | 7 +++---- .../lib/elasticsearch/api/actions/indices/shard_stores.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/shrink.rb | 5 ++--- .../api/actions/indices/simulate_index_template.rb | 3 +-- .../elasticsearch/api/actions/indices/simulate_template.rb | 3 +-- .../lib/elasticsearch/api/actions/indices/split.rb | 5 ++--- .../lib/elasticsearch/api/actions/indices/stats.rb | 3 +-- .../lib/elasticsearch/api/actions/indices/unfreeze.rb | 5 ++--- .../elasticsearch/api/actions/indices/update_aliases.rb | 5 ++--- .../elasticsearch/api/actions/indices/validate_query.rb | 5 ++--- elasticsearch-api/lib/elasticsearch/api/actions/info.rb | 5 ++--- .../elasticsearch/api/actions/ingest/delete_pipeline.rb | 3 +-- .../lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb | 5 ++--- .../lib/elasticsearch/api/actions/ingest/get_pipeline.rb | 3 +-- .../lib/elasticsearch/api/actions/ingest/processor_grok.rb | 5 ++--- .../lib/elasticsearch/api/actions/ingest/put_pipeline.rb | 3 +-- .../lib/elasticsearch/api/actions/ingest/simulate.rb | 3 +-- .../lib/elasticsearch/api/actions/knn_search.rb | 5 ++--- .../lib/elasticsearch/api/actions/license/delete.rb | 5 ++--- .../lib/elasticsearch/api/actions/license/get.rb | 5 ++--- .../elasticsearch/api/actions/license/get_basic_status.rb | 5 ++--- .../elasticsearch/api/actions/license/get_trial_status.rb | 5 ++--- .../lib/elasticsearch/api/actions/license/post.rb | 5 ++--- .../elasticsearch/api/actions/license/post_start_basic.rb | 5 ++--- .../elasticsearch/api/actions/license/post_start_trial.rb | 5 ++--- .../elasticsearch/api/actions/logstash/delete_pipeline.rb | 3 +-- .../lib/elasticsearch/api/actions/logstash/get_pipeline.rb | 3 +-- .../lib/elasticsearch/api/actions/logstash/put_pipeline.rb | 3 +-- .../api/actions/machine_learning/close_job.rb | 3 +-- .../api/actions/machine_learning/delete_calendar.rb | 3 +-- .../api/actions/machine_learning/delete_calendar_event.rb | 3 +-- .../api/actions/machine_learning/delete_calendar_job.rb | 3 +-- .../machine_learning/delete_data_frame_analytics.rb | 3 +-- .../api/actions/machine_learning/delete_datafeed.rb | 3 +-- .../api/actions/machine_learning/delete_expired_data.rb | 3 +-- .../api/actions/machine_learning/delete_filter.rb | 3 +-- .../api/actions/machine_learning/delete_forecast.rb | 3 +-- .../api/actions/machine_learning/delete_job.rb | 3 +-- .../api/actions/machine_learning/delete_model_snapshot.rb | 3 +-- .../api/actions/machine_learning/delete_trained_model.rb | 3 +-- .../actions/machine_learning/delete_trained_model_alias.rb | 3 +-- .../api/actions/machine_learning/estimate_model_memory.rb | 5 ++--- .../api/actions/machine_learning/evaluate_data_frame.rb | 5 ++--- .../machine_learning/explain_data_frame_analytics.rb | 3 +-- .../api/actions/machine_learning/flush_job.rb | 3 +-- .../elasticsearch/api/actions/machine_learning/forecast.rb | 3 +-- .../api/actions/machine_learning/get_buckets.rb | 3 +-- .../api/actions/machine_learning/get_calendar_events.rb | 3 +-- .../api/actions/machine_learning/get_calendars.rb | 3 +-- .../api/actions/machine_learning/get_categories.rb | 3 +-- .../actions/machine_learning/get_data_frame_analytics.rb | 3 +-- .../machine_learning/get_data_frame_analytics_stats.rb | 3 +-- .../api/actions/machine_learning/get_datafeed_stats.rb | 3 +-- .../api/actions/machine_learning/get_datafeeds.rb | 3 +-- .../api/actions/machine_learning/get_filters.rb | 3 +-- .../api/actions/machine_learning/get_influencers.rb | 3 +-- .../api/actions/machine_learning/get_job_stats.rb | 3 +-- .../elasticsearch/api/actions/machine_learning/get_jobs.rb | 3 +-- .../machine_learning/get_model_snapshot_upgrade_stats.rb | 3 +-- .../api/actions/machine_learning/get_model_snapshots.rb | 3 +-- .../api/actions/machine_learning/get_overall_buckets.rb | 3 +-- .../api/actions/machine_learning/get_records.rb | 3 +-- .../api/actions/machine_learning/get_trained_models.rb | 3 +-- .../actions/machine_learning/get_trained_models_stats.rb | 3 +-- .../machine_learning/infer_trained_model_deployment.rb | 3 +-- .../lib/elasticsearch/api/actions/machine_learning/info.rb | 5 ++--- .../elasticsearch/api/actions/machine_learning/open_job.rb | 3 +-- .../api/actions/machine_learning/post_calendar_events.rb | 3 +-- .../api/actions/machine_learning/post_data.rb | 3 +-- .../machine_learning/preview_data_frame_analytics.rb | 3 +-- .../api/actions/machine_learning/preview_datafeed.rb | 3 +-- .../api/actions/machine_learning/put_calendar.rb | 3 +-- .../api/actions/machine_learning/put_calendar_job.rb | 3 +-- .../actions/machine_learning/put_data_frame_analytics.rb | 3 +-- .../api/actions/machine_learning/put_datafeed.rb | 3 +-- .../api/actions/machine_learning/put_filter.rb | 3 +-- .../elasticsearch/api/actions/machine_learning/put_job.rb | 3 +-- .../api/actions/machine_learning/put_trained_model.rb | 3 +-- .../actions/machine_learning/put_trained_model_alias.rb | 3 +-- .../machine_learning/put_trained_model_definition_part.rb | 3 +-- .../machine_learning/put_trained_model_vocabulary.rb | 3 +-- .../api/actions/machine_learning/reset_job.rb | 3 +-- .../api/actions/machine_learning/revert_model_snapshot.rb | 3 +-- .../api/actions/machine_learning/set_upgrade_mode.rb | 5 ++--- .../actions/machine_learning/start_data_frame_analytics.rb | 3 +-- .../api/actions/machine_learning/start_datafeed.rb | 3 +-- .../machine_learning/start_trained_model_deployment.rb | 3 +-- .../actions/machine_learning/stop_data_frame_analytics.rb | 3 +-- .../api/actions/machine_learning/stop_datafeed.rb | 3 +-- .../machine_learning/stop_trained_model_deployment.rb | 7 +++---- .../machine_learning/update_data_frame_analytics.rb | 3 +-- .../api/actions/machine_learning/update_datafeed.rb | 3 +-- .../api/actions/machine_learning/update_filter.rb | 3 +-- .../api/actions/machine_learning/update_job.rb | 3 +-- .../api/actions/machine_learning/update_model_snapshot.rb | 3 +-- .../api/actions/machine_learning/upgrade_job_snapshot.rb | 3 +-- .../elasticsearch/api/actions/machine_learning/validate.rb | 5 ++--- .../api/actions/machine_learning/validate_detector.rb | 5 ++--- elasticsearch-api/lib/elasticsearch/api/actions/mget.rb | 5 ++--- .../elasticsearch/api/actions/migration/deprecations.rb | 5 ++--- .../api/actions/migration/get_feature_upgrade_status.rb | 5 ++--- .../api/actions/migration/post_feature_upgrade.rb | 5 ++--- .../lib/elasticsearch/api/actions/monitoring/bulk.rb | 3 +-- elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb | 5 ++--- .../lib/elasticsearch/api/actions/msearch_template.rb | 5 ++--- .../lib/elasticsearch/api/actions/mtermvectors.rb | 3 +-- .../actions/nodes/clear_repositories_metering_archive.rb | 3 +-- .../api/actions/nodes/get_repositories_metering_info.rb | 3 +-- .../lib/elasticsearch/api/actions/nodes/hot_threads.rb | 3 +-- .../lib/elasticsearch/api/actions/nodes/info.rb | 3 +-- .../api/actions/nodes/reload_secure_settings.rb | 3 +-- .../lib/elasticsearch/api/actions/nodes/stats.rb | 3 +-- .../lib/elasticsearch/api/actions/nodes/usage.rb | 3 +-- .../lib/elasticsearch/api/actions/open_point_in_time.rb | 5 ++--- elasticsearch-api/lib/elasticsearch/api/actions/ping.rb | 5 ++--- .../lib/elasticsearch/api/actions/put_script.rb | 3 +-- .../lib/elasticsearch/api/actions/rank_eval.rb | 5 ++--- elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb | 5 ++--- .../lib/elasticsearch/api/actions/reindex_rethrottle.rb | 3 +-- .../elasticsearch/api/actions/render_search_template.rb | 3 +-- .../lib/elasticsearch/api/actions/rollup/delete_job.rb | 3 +-- .../lib/elasticsearch/api/actions/rollup/get_jobs.rb | 3 +-- .../elasticsearch/api/actions/rollup/get_rollup_caps.rb | 3 +-- .../api/actions/rollup/get_rollup_index_caps.rb | 5 ++--- .../lib/elasticsearch/api/actions/rollup/put_job.rb | 3 +-- .../lib/elasticsearch/api/actions/rollup/rollup.rb | 5 ++--- .../lib/elasticsearch/api/actions/rollup/rollup_search.rb | 5 ++--- .../lib/elasticsearch/api/actions/rollup/start_job.rb | 3 +-- .../lib/elasticsearch/api/actions/rollup/stop_job.rb | 3 +-- .../elasticsearch/api/actions/scripts_painless_execute.rb | 5 ++--- elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb | 3 +-- elasticsearch-api/lib/elasticsearch/api/actions/search.rb | 2 +- .../lib/elasticsearch/api/actions/search_mvt.rb | 5 ++--- .../lib/elasticsearch/api/actions/search_shards.rb | 5 ++--- .../lib/elasticsearch/api/actions/search_template.rb | 5 ++--- .../api/actions/searchable_snapshots/cache_stats.rb | 3 +-- .../api/actions/searchable_snapshots/clear_cache.rb | 5 ++--- .../api/actions/searchable_snapshots/mount.rb | 3 +-- .../api/actions/searchable_snapshots/stats.rb | 5 ++--- .../lib/elasticsearch/api/actions/security/authenticate.rb | 5 ++--- .../elasticsearch/api/actions/security/change_password.rb | 3 +-- .../api/actions/security/clear_api_key_cache.rb | 5 ++--- .../api/actions/security/clear_cached_privileges.rb | 3 +-- .../api/actions/security/clear_cached_realms.rb | 3 +-- .../api/actions/security/clear_cached_roles.rb | 3 +-- .../api/actions/security/clear_cached_service_tokens.rb | 3 +-- .../elasticsearch/api/actions/security/create_api_key.rb | 5 ++--- .../api/actions/security/create_service_token.rb | 3 +-- .../api/actions/security/delete_privileges.rb | 3 +-- .../lib/elasticsearch/api/actions/security/delete_role.rb | 3 +-- .../api/actions/security/delete_role_mapping.rb | 3 +-- .../api/actions/security/delete_service_token.rb | 3 +-- .../lib/elasticsearch/api/actions/security/delete_user.rb | 3 +-- .../lib/elasticsearch/api/actions/security/disable_user.rb | 3 +-- .../lib/elasticsearch/api/actions/security/enable_user.rb | 3 +-- .../elasticsearch/api/actions/security/enroll_kibana.rb | 5 ++--- .../lib/elasticsearch/api/actions/security/enroll_node.rb | 5 ++--- .../lib/elasticsearch/api/actions/security/get_api_key.rb | 5 ++--- .../api/actions/security/get_builtin_privileges.rb | 5 ++--- .../elasticsearch/api/actions/security/get_privileges.rb | 3 +-- .../lib/elasticsearch/api/actions/security/get_role.rb | 3 +-- .../elasticsearch/api/actions/security/get_role_mapping.rb | 3 +-- .../api/actions/security/get_service_accounts.rb | 3 +-- .../api/actions/security/get_service_credentials.rb | 3 +-- .../lib/elasticsearch/api/actions/security/get_token.rb | 5 ++--- .../lib/elasticsearch/api/actions/security/get_user.rb | 3 +-- .../api/actions/security/get_user_privileges.rb | 5 ++--- .../elasticsearch/api/actions/security/grant_api_key.rb | 5 ++--- .../elasticsearch/api/actions/security/has_privileges.rb | 3 +-- .../api/actions/security/invalidate_api_key.rb | 5 ++--- .../elasticsearch/api/actions/security/invalidate_token.rb | 5 ++--- .../elasticsearch/api/actions/security/put_privileges.rb | 5 ++--- .../lib/elasticsearch/api/actions/security/put_role.rb | 3 +-- .../elasticsearch/api/actions/security/put_role_mapping.rb | 3 +-- .../lib/elasticsearch/api/actions/security/put_user.rb | 3 +-- .../elasticsearch/api/actions/security/query_api_keys.rb | 5 ++--- .../api/actions/security/saml_authenticate.rb | 5 ++--- .../api/actions/security/saml_complete_logout.rb | 5 ++--- .../elasticsearch/api/actions/security/saml_invalidate.rb | 5 ++--- .../lib/elasticsearch/api/actions/security/saml_logout.rb | 5 ++--- .../api/actions/security/saml_prepare_authentication.rb | 5 ++--- .../api/actions/security/saml_service_provider_metadata.rb | 3 +-- .../lib/elasticsearch/api/actions/shutdown/delete_node.rb | 3 +-- .../lib/elasticsearch/api/actions/shutdown/get_node.rb | 3 +-- .../lib/elasticsearch/api/actions/shutdown/put_node.rb | 3 +-- .../api/actions/snapshot/cleanup_repository.rb | 3 +-- .../lib/elasticsearch/api/actions/snapshot/clone.rb | 3 +-- .../lib/elasticsearch/api/actions/snapshot/create.rb | 3 +-- .../api/actions/snapshot/create_repository.rb | 3 +-- .../lib/elasticsearch/api/actions/snapshot/delete.rb | 3 +-- .../api/actions/snapshot/delete_repository.rb | 3 +-- .../lib/elasticsearch/api/actions/snapshot/get.rb | 3 +-- .../elasticsearch/api/actions/snapshot/get_repository.rb | 3 +-- .../api/actions/snapshot/repository_analyze.rb | 3 +-- .../lib/elasticsearch/api/actions/snapshot/restore.rb | 3 +-- .../lib/elasticsearch/api/actions/snapshot/status.rb | 3 +-- .../api/actions/snapshot/verify_repository.rb | 3 +-- .../snapshot_lifecycle_management/delete_lifecycle.rb | 3 +-- .../snapshot_lifecycle_management/execute_lifecycle.rb | 3 +-- .../snapshot_lifecycle_management/execute_retention.rb | 5 ++--- .../actions/snapshot_lifecycle_management/get_lifecycle.rb | 3 +-- .../api/actions/snapshot_lifecycle_management/get_stats.rb | 5 ++--- .../actions/snapshot_lifecycle_management/get_status.rb | 5 ++--- .../actions/snapshot_lifecycle_management/put_lifecycle.rb | 3 +-- .../api/actions/snapshot_lifecycle_management/start.rb | 5 ++--- .../api/actions/snapshot_lifecycle_management/stop.rb | 5 ++--- .../lib/elasticsearch/api/actions/sql/clear_cursor.rb | 5 ++--- .../lib/elasticsearch/api/actions/sql/delete_async.rb | 3 +-- .../lib/elasticsearch/api/actions/sql/get_async.rb | 3 +-- .../lib/elasticsearch/api/actions/sql/get_async_status.rb | 3 +-- .../lib/elasticsearch/api/actions/sql/query.rb | 5 ++--- .../lib/elasticsearch/api/actions/sql/translate.rb | 5 ++--- .../lib/elasticsearch/api/actions/ssl/certificates.rb | 5 ++--- .../lib/elasticsearch/api/actions/tasks/cancel.rb | 3 +-- .../lib/elasticsearch/api/actions/tasks/get.rb | 3 +-- .../lib/elasticsearch/api/actions/tasks/list.rb | 5 ++--- .../lib/elasticsearch/api/actions/terms_enum.rb | 5 ++--- .../lib/elasticsearch/api/actions/termvectors.rb | 5 ++--- .../api/actions/text_structure/find_structure.rb | 5 ++--- .../api/actions/transform/delete_transform.rb | 3 +-- .../elasticsearch/api/actions/transform/get_transform.rb | 3 +-- .../api/actions/transform/get_transform_stats.rb | 3 +-- .../api/actions/transform/preview_transform.rb | 3 +-- .../elasticsearch/api/actions/transform/put_transform.rb | 3 +-- .../elasticsearch/api/actions/transform/start_transform.rb | 3 +-- .../elasticsearch/api/actions/transform/stop_transform.rb | 3 +-- .../api/actions/transform/update_transform.rb | 3 +-- .../api/actions/transform/upgrade_transforms.rb | 5 ++--- elasticsearch-api/lib/elasticsearch/api/actions/update.rb | 3 +-- .../lib/elasticsearch/api/actions/update_by_query.rb | 5 ++--- .../api/actions/update_by_query_rethrottle.rb | 3 +-- .../lib/elasticsearch/api/actions/watcher/ack_watch.rb | 3 +-- .../elasticsearch/api/actions/watcher/activate_watch.rb | 3 +-- .../elasticsearch/api/actions/watcher/deactivate_watch.rb | 3 +-- .../lib/elasticsearch/api/actions/watcher/delete_watch.rb | 3 +-- .../lib/elasticsearch/api/actions/watcher/execute_watch.rb | 3 +-- .../lib/elasticsearch/api/actions/watcher/get_watch.rb | 3 +-- .../lib/elasticsearch/api/actions/watcher/put_watch.rb | 3 +-- .../lib/elasticsearch/api/actions/watcher/query_watches.rb | 5 ++--- .../lib/elasticsearch/api/actions/watcher/start.rb | 5 ++--- .../lib/elasticsearch/api/actions/watcher/stats.rb | 3 +-- .../lib/elasticsearch/api/actions/watcher/stop.rb | 5 ++--- .../lib/elasticsearch/api/actions/xpack/info.rb | 5 ++--- .../lib/elasticsearch/api/actions/xpack/usage.rb | 5 ++--- 393 files changed, 556 insertions(+), 947 deletions(-) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb index cc4b26d390..681d051923 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/delete.rb @@ -29,12 +29,11 @@ module Actions def delete(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb index 53cfa2651f..7dc619bfac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/get.rb @@ -32,12 +32,11 @@ module Actions def get(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb index f577991432..546b4cf4a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/status.rb @@ -29,12 +29,11 @@ module Actions def status(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb index 85171842a7..efb759d5d6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb @@ -69,11 +69,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html # def submit(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb index e61d2925ea..124cb8880f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb @@ -29,12 +29,11 @@ module Actions def delete_autoscaling_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb index 2f48d5ffc5..b990fdcb66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html # def get_autoscaling_capacity(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_autoscaling/capacity" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb index 75a5be82b5..aceb53ddcc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb @@ -29,12 +29,11 @@ module Actions def get_autoscaling_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb index 0b60654672..9f47208fe6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb @@ -31,12 +31,11 @@ def put_autoscaling_policy(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 2b7313b25e..691eb23c0a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -39,11 +39,10 @@ module Actions def bulk(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 748a268ed5..3c02084302 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -34,12 +34,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html # def aliases(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index 1913fb0bb5..83214100c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -35,12 +35,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html # def allocation(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index f05c4204e9..c3f085e5fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html # def count(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index 115ef15f0f..ffb0358447 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -33,12 +33,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html # def fielddata(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _fields = arguments.delete(:fields) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index a7b9df4b47..c19e07dc77 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html # def health(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cat/health" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb index 0579d97f3b..edd9742011 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/help.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html # def help(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cat" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index f636be5a18..ade59f3c21 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -39,11 +39,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html # def indices(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb index b38aa36fee..e477155eac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/master.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html # def master(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cat/master" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb index 7b4b1f4ddf..1b734cabd0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb @@ -35,12 +35,11 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html # def ml_data_frame_analytics(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb index bbf69d2324..81bb1e3abf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb @@ -35,12 +35,11 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html # def ml_datafeeds(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb index 648d9bbdcb..b793320af6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_jobs.rb @@ -36,12 +36,11 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html # def ml_jobs(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb index ada0e39a9f..39b5bc4843 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/ml_trained_models.rb @@ -37,12 +37,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html # def ml_trained_models(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb index 821fc640dd..0776d435cd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodeattrs.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html # def nodeattrs(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cat/nodeattrs" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index 375eb3b6ef..2b2015b4ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html # def nodes(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cat/nodes" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb index b09dde2996..f277d65a04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/pending_tasks.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html # def pending_tasks(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cat/pending_tasks" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb index cb8fe7d597..914b73ba25 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/plugins.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html # def plugins(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cat/plugins" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index 0ae71362d2..8bd2a0afde 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -36,11 +36,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html # def recovery(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index a12eff919d..b5157a129a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html # def repositories(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cat/repositories" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb index f46e18b7ef..26044ad87e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/segments.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html # def segments(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb index 90b92bd04f..48c7a364a3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/shards.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html # def shards(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index 7fddbf5420..25e668b741 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -35,12 +35,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html # def snapshots(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index 2c61835cc7..81990e7708 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -40,11 +40,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html # def tasks(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cat/tasks" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb index d252d9b452..3422a359c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/templates.rb @@ -34,12 +34,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html # def templates(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb index def74aac09..90c309aa06 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/thread_pool.rb @@ -36,12 +36,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html # def thread_pool(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _thread_pool_patterns = arguments.delete(:thread_pool_patterns) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb index c25c848c7b..3839085856 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/transforms.rb @@ -36,12 +36,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html # def transforms(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb index 39302d99de..ac6c16fecc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/clear_scroll.rb @@ -32,12 +32,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html # def clear_scroll(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _scroll_id = arguments.delete(:scroll_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb index 5f1e3724c1..85d479b36c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/close_point_in_time.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html # def close_point_in_time(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE path = "_pit" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index 5a2b68ea1a..2bd5619098 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -29,11 +29,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html # def allocation_explain(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb index ffb411c20a..5d04d3bf74 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_component_template.rb @@ -31,12 +31,11 @@ module Actions def delete_component_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb index eb9793adcc..6bf583c4d8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb @@ -27,11 +27,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html # def delete_voting_config_exclusions(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_DELETE path = "_cluster/voting_config_exclusions" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb index 1fe186ee10..d21a3ab562 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/exists_component_template.rb @@ -31,12 +31,11 @@ module Actions def exists_component_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_HEAD diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb index 07f79105a8..836f73e52d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_component_template.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html # def get_component_template(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb index 73fd6163fd..364a8a1528 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/get_settings.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html # def get_settings(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cluster/settings" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb index 4a7a59e0fb..1af9111c81 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/health.rb @@ -38,11 +38,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html # def health(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb index 5751c5db79..891bd86eae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/pending_tasks.rb @@ -29,11 +29,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html # def pending_tasks(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_cluster/pending_tasks" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb index cdb07f405a..92edf78352 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb @@ -29,11 +29,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html # def post_voting_config_exclusions(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_cluster/voting_config_exclusions" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb index b66780e7ec..cbfa14fbd3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_component_template.rb @@ -34,12 +34,11 @@ def put_component_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb index 8e99712092..218ae12db8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/put_settings.rb @@ -32,12 +32,11 @@ module Actions def put_settings(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) || {} - arguments = arguments.clone - method = Elasticsearch::API::HTTP_PUT path = "_cluster/settings" params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb index c0dc2d78c2..fcb65c4093 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/remote_info.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html # def remote_info(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_remote/info" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb index b64e4b6551..0f15637320 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/reroute.rb @@ -33,12 +33,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html # def reroute(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) || {} - arguments = arguments.clone - method = Elasticsearch::API::HTTP_POST path = "_cluster/reroute" params = Utils.process_params(arguments) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb index 83898fd524..7ea46e9d92 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/state.rb @@ -36,12 +36,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html # def state(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _metric = arguments.delete(:metric) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb index 11854e899f..3414242a9c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/stats.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html # def stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index 5087d8a317..284f56ac98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -41,11 +41,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html # def count(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb index 3b23a555c3..e4c70c22b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb @@ -29,12 +29,11 @@ module Actions def delete_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb index 0fed0c8536..f13fc7f7fc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb @@ -32,11 +32,10 @@ def follow(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb index 408d3a88a3..00e7bf35a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb @@ -29,11 +29,10 @@ module Actions def follow_info(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb index dce822ba62..6e91d1eaa5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb @@ -29,11 +29,10 @@ module Actions def follow_stats(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb index ad8a1a89bf..29fa292857 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb @@ -31,11 +31,10 @@ def forget_follower(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb index 2bf4a610bb..4258c20c01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html # def get_auto_follow_pattern(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb index 423173db14..47c3da045f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb @@ -29,12 +29,11 @@ module Actions def pause_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb index d8c6d4677a..599ef3b4e3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb @@ -29,11 +29,10 @@ module Actions def pause_follow(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb index 1f7e79fb08..39059f0ade 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb @@ -31,12 +31,11 @@ def put_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb index a31783f88d..ef3b279680 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb @@ -29,12 +29,11 @@ module Actions def resume_auto_follow_pattern(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb index ef2cedcd1f..60ca4e8751 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb @@ -30,11 +30,10 @@ module Actions def resume_follow(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb index 13f4d43075..1a354da27b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html # def stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_ccr/stats" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb index 9655cdab83..fa762ce78f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb @@ -29,11 +29,10 @@ module Actions def unfollow(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb index 40fee49d69..8973857909 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb @@ -32,12 +32,11 @@ module Actions def delete_dangling_index(arguments = {}) raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _index_uuid = arguments.delete(:index_uuid) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb index 592ded4dc2..bad3b8742a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb @@ -32,12 +32,11 @@ module Actions def import_dangling_index(arguments = {}) raise ArgumentError, "Required argument 'index_uuid' missing" unless arguments[:index_uuid] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _index_uuid = arguments.delete(:index_uuid) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb index 45b7b9647f..782c3b41fa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html # def list_dangling_indices(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_dangling" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb index 5b3d1119ae..7b39d85ffe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete.rb @@ -38,12 +38,11 @@ def delete(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb index 00d3761c81..f9c1bb60b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query.rb @@ -59,11 +59,10 @@ def delete_by_query(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb index f788f7ff6d..cde28903bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb @@ -29,12 +29,11 @@ module Actions def delete_by_query_rethrottle(arguments = {}) raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb index 807f8473d3..9d8f2ce404 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/delete_script.rb @@ -30,12 +30,11 @@ module Actions def delete_script(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb index 5bf62a3358..955da8cdfe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/delete_policy.rb @@ -29,12 +29,11 @@ module Actions def delete_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb index 68e9714b43..8e1d1af830 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/execute_policy.rb @@ -30,12 +30,11 @@ module Actions def execute_policy(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb index d763a0fccb..1b22cedf71 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/get_policy.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html # def get_policy(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb index ec73d52684..ab920ed9a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/put_policy.rb @@ -31,12 +31,11 @@ def put_policy(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb index 4e91b02faa..dafea7e684 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/enrich/stats.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html # def stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_enrich/_stats" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb index 2c8ee826c0..2eeaa28e39 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/delete.rb @@ -29,12 +29,11 @@ module Actions def delete(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb index 0bea2bc75d..5e93f62bcf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get.rb @@ -31,12 +31,11 @@ module Actions def get(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb index d2f9a1d185..7e96bcbb9f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/get_status.rb @@ -29,12 +29,11 @@ module Actions def get_status(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb index 272fe78991..19ce1220c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb @@ -34,11 +34,11 @@ def search(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone arguments[:index] = UNDERSCORE_ALL if !arguments[:index] && arguments[:type] _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb index 3a512b1450..2885da89a4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists.rb @@ -40,12 +40,11 @@ def exists(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb index 5ab0be71ca..c7f4255cff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/exists_source.rb @@ -39,12 +39,11 @@ def exists_source(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index 59694bb4ac..b7f8ec8351 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -43,12 +43,11 @@ def explain(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb index 38fbec769d..2230d3db43 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/get_features.rb @@ -27,11 +27,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html # def get_features(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_features" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb index c3c42da0cb..97931368e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/features/reset_features.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html # def reset_features(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_features/_reset" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 0c133b372f..f97d041ee8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html # def field_caps(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb index 7ec0218b2e..c29fae6fd7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb @@ -33,11 +33,10 @@ module Actions def global_checkpoints(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb index 7ec5c2fa21..55bf4b02fe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get.rb @@ -40,12 +40,11 @@ def get(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb index ceae26a74b..8b9c45654b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script.rb @@ -29,12 +29,11 @@ module Actions def get_script(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb index 2ed6ea3bf2..0ee5e719fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_context.rb @@ -25,11 +25,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html # def get_script_context(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_script_context" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb index 63de10fb79..16347d44e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_script_languages.rb @@ -25,11 +25,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html # def get_script_languages(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_script_language" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb index bac7daf8c4..923ae8dd21 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/get_source.rb @@ -39,12 +39,11 @@ def get_source(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb index 538cb931e1..658bc8768d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/graph/explore.rb @@ -32,11 +32,10 @@ module Actions def explore(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb index 4c28a25862..58dddbd4f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index.rb @@ -42,12 +42,11 @@ def index(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb index 84f8448942..7c53bd1872 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb @@ -29,12 +29,11 @@ module Actions def delete_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _policy = arguments.delete(:policy) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb index e17b1cdde2..7d0d281b2e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb @@ -31,11 +31,10 @@ module Actions def explain_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb index ff5f0fa86f..808261204c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html # def get_lifecycle(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _policy = arguments.delete(:policy) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb index 84130e5a7e..103811b745 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html # def get_status(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_ilm/status" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb index 9e85ab7a94..784e0f74a5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html # def migrate_to_data_tiers(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_ilm/migrate_to_data_tiers" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb index c98b27a6ee..f68316e3c5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb @@ -30,11 +30,10 @@ module Actions def move_to_step(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb index 6f6306ed61..9bfb7746d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb @@ -30,12 +30,11 @@ module Actions def put_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy' missing" unless arguments[:policy] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _policy = arguments.delete(:policy) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb index 5194ecffdb..1d892c25ef 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb @@ -29,11 +29,10 @@ module Actions def remove_policy(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb index a1dd12a028..508ad3945e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb @@ -29,11 +29,10 @@ module Actions def retry(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb index bee8d9da61..b627384ec0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html # def start(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_ilm/start" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb index 167b6f7df2..19d58b58ee 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html # def stop(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_ilm/stop" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb index 9041fdf032..937e28135c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/add_block.rb @@ -36,11 +36,10 @@ def add_block(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'block' missing" unless arguments[:block] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb index 2de47effb0..d61d0d1b51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/analyze.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html # def analyze(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb index 2c3125a90f..655354dcaf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clear_cache.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html # def clear_cache(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb index 910c138992..fdc1695d4a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/clone.rb @@ -35,11 +35,10 @@ def clone(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'target' missing" unless arguments[:target] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb index 5e889ca1b3..a79c018220 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/close.rb @@ -35,11 +35,10 @@ module Actions def close(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb index 6c02cfc49c..3e2c0f5a7d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create.rb @@ -33,11 +33,10 @@ module Actions def create(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb index 81b9d26d98..2824e003f5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/create_data_stream.rb @@ -29,12 +29,11 @@ module Actions def create_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb index 22b5c86050..3c17bc04ac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/data_streams_stats.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html # def data_streams_stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb index 7885ed7d36..2a6ef0eb1a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete.rb @@ -34,11 +34,10 @@ module Actions def delete(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb index 2f4bdabff1..5ba9fcb818 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_alias.rb @@ -33,11 +33,10 @@ def delete_alias(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb index 216f48958d..4c11f640de 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_data_stream.rb @@ -30,12 +30,11 @@ module Actions def delete_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb index bb6a29ecc4..f36284478f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_index_template.rb @@ -31,12 +31,11 @@ module Actions def delete_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb index fd76f06999..c5a82906f8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/delete_template.rb @@ -31,12 +31,11 @@ module Actions def delete_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb index 3bcca16e3e..1270ec2199 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/disk_usage.rb @@ -38,11 +38,10 @@ module Actions def disk_usage(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb index cf993cfdb3..b414554609 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb @@ -35,11 +35,10 @@ module Actions def exists(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb index 4faebae687..ca0ac918c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_alias.rb @@ -34,12 +34,11 @@ module Actions def exists_alias(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb index 499039ecf6..ab267dfc58 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_index_template.rb @@ -32,12 +32,11 @@ module Actions def exists_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_HEAD diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb index 6a07ca5d59..4ecedce055 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/exists_template.rb @@ -32,12 +32,11 @@ module Actions def exists_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_HEAD diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb index 56809bcbe0..756186f22f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/field_usage_stats.rb @@ -37,11 +37,10 @@ module Actions def field_usage_stats(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb index 1e12ebe6d8..7a19a32643 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/flush.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html # def flush(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb index 408ee45cc4..768e1a321c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/forcemerge.rb @@ -33,11 +33,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html # def forcemerge(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb index 1b30b037ea..38981f824e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get.rb @@ -36,11 +36,10 @@ module Actions def get(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb index ebd1c64599..6e996a7395 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_alias.rb @@ -32,12 +32,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html # def get_alias(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb index 6edfee03dd..66fbbb1468 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_data_stream.rb @@ -28,12 +28,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html # def get_data_stream(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index 8d38ca2f08..b7ef752ab8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -33,14 +33,13 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html # def get_field_mapping(arguments = {}) + arguments = arguments.clone _fields = arguments.delete(:field) || arguments.delete(:fields) raise ArgumentError, "Required argument 'field' missing" unless _fields headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb index 5fc665fa61..6c20270b08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_index_template.rb @@ -30,12 +30,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html # def get_index_template(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb index 0ac8a82767..c16b91770b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_mapping.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html # def get_mapping(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb index e23ee54971..ff0cdd1fb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_settings.rb @@ -35,11 +35,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html # def get_settings(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb index bbfad16d93..0242f4de29 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_template.rb @@ -30,12 +30,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html # def get_template(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb index 0f084ff543..6f71b33fd9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb @@ -29,12 +29,11 @@ module Actions def migrate_to_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb index 32bef15898..037e210a88 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/modify_data_stream.rb @@ -29,11 +29,10 @@ module Actions def modify_data_stream(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_data_stream/_modify" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb index 38c4919be6..4ca33b5624 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/open.rb @@ -35,11 +35,10 @@ module Actions def open(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb index 82b2f052e9..51d4546c24 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/promote_data_stream.rb @@ -29,12 +29,11 @@ module Actions def promote_data_stream(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb index 63028033a6..2a6a9b53b5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb @@ -34,11 +34,10 @@ def put_alias(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb index 8c13b6f9b3..02c87c4c32 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb @@ -34,12 +34,11 @@ def put_index_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index e82d2a5f80..dde237e154 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -37,11 +37,10 @@ def put_mapping(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb index edcc94e4b0..31c7c56848 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_settings.rb @@ -37,11 +37,10 @@ module Actions def put_settings(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb index a8f1ee9f7f..db2344cd86 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_template.rb @@ -34,12 +34,11 @@ def put_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index 256319c80a..64b5202eff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -29,11 +29,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html # def recovery(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb index 9f042d861e..60090725a0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/refresh.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html # def refresh(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb index f75bb33d1e..7fcdd998a7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb @@ -32,11 +32,10 @@ module Actions def reload_search_analyzers(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index ad4166bae3..771d04081e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -30,12 +30,11 @@ module Actions def resolve_index(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index 4071a007e3..a704739b66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -36,11 +36,10 @@ module Actions def rollover(arguments = {}) raise ArgumentError, "Required argument 'alias' missing" unless arguments[:alias] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _alias = arguments.delete(:alias) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb index 66bbbce7d3..216bf49d04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/segments.rb @@ -25,17 +25,16 @@ module Actions # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed) # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - # @option arguments [Boolean] :verbose Includes detailed memory usage by Lucene. + # @option arguments [Boolean] :verbose Includes detailed memory usage by Lucene. *Deprecated* # @option arguments [Hash] :headers Custom HTTP headers # # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html # def segments(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb index 1d64b865f3..bde1fc9d59 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shard_stores.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html # def shard_stores(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb index 107b0ac5cd..aaf7cb4a45 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/shrink.rb @@ -35,11 +35,10 @@ def shrink(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'target' missing" unless arguments[:target] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb index a3151750f1..f785bf3baa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_index_template.rb @@ -33,12 +33,11 @@ module Actions def simulate_index_template(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb index 7d887d0ed8..5d2a90657f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/simulate_template.rb @@ -31,12 +31,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html # def simulate_template(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb index 1020df9119..d0f081d52c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/split.rb @@ -35,11 +35,10 @@ def split(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'target' missing" unless arguments[:target] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb index 0be8c285e0..32f7e6fbb3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/stats.rb @@ -37,12 +37,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html # def stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _metric = arguments.delete(:metric) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb index 8ee5edf01e..15a2820f3a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/unfreeze.rb @@ -40,11 +40,10 @@ module Actions def unfreeze(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index 5b2dccea5b..2314ebdbcb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -31,11 +31,10 @@ module Actions def update_aliases(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_aliases" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index e2480a0a75..de3488ec11 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -40,11 +40,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html # def validate_query(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb index bd91cc63ed..fdaf9edc1e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/info.rb @@ -25,11 +25,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html # def info(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb index 72663bba96..037677ef8f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb @@ -31,12 +31,11 @@ module Actions def delete_pipeline(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb index 485e37440d..eb65dd8bf9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html # def geo_ip_stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_ingest/geoip/stats" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb index aa461cdfca..b65f9d5eb2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/get_pipeline.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html # def get_pipeline(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb index f768c17efb..0a2c91c0a2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/processor_grok.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get # def processor_grok(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_ingest/processor/grok" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb index afe5caa33c..044ea5c9b7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/put_pipeline.rb @@ -33,12 +33,11 @@ def put_pipeline(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb index b8b9d28c6c..0d563ba018 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ingest/simulate.rb @@ -31,12 +31,11 @@ module Actions def simulate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb index f785c02886..bba5f9e914 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/knn_search.rb @@ -34,11 +34,10 @@ module Actions def knn_search(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb index dac7f04f7c..ae3e903a19 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html # def delete(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_DELETE path = "_license" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb index 9af95302dc..042a055201 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html # def get(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_license" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb index f0ed758069..5706737cdd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_basic_status.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html # def get_basic_status(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_license/basic_status" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb index a3b47e51ed..328afecdb7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/get_trial_status.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html # def get_trial_status(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_license/trial_status" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb index 0222e37cde..61ff8d0a8c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html # def post(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT path = "_license" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb index cac9936ee4..1a0c5115ab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb @@ -27,11 +27,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html # def post_start_basic(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_license/start_basic" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb index 78e705de1a..9f21026a66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html # def post_start_trial(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_license/start_trial" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb index 05258c76b0..353d4a8d98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb @@ -29,12 +29,11 @@ module Actions def delete_pipeline(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb index 82642d2120..c61ca7bbbe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/get_pipeline.rb @@ -29,12 +29,11 @@ module Actions def get_pipeline(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb index 8f84e5a6d4..818bc0a8ff 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/logstash/put_pipeline.rb @@ -31,12 +31,11 @@ def put_pipeline(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb index e738872a06..caf3de31f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/close_job.rb @@ -34,12 +34,11 @@ module Actions def close_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb index 38b6912bb5..2ca67fb38c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb @@ -29,12 +29,11 @@ module Actions def delete_calendar(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb index faaa9f27b5..2f3e5851e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb @@ -31,12 +31,11 @@ def delete_calendar_event(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] raise ArgumentError, "Required argument 'event_id' missing" unless arguments[:event_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _calendar_id = arguments.delete(:calendar_id) _event_id = arguments.delete(:event_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb index 5da279009d..c30d2ea683 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb @@ -31,12 +31,11 @@ def delete_calendar_job(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _calendar_id = arguments.delete(:calendar_id) _job_id = arguments.delete(:job_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb index 52d0703757..cd815327bd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb @@ -31,12 +31,11 @@ module Actions def delete_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb index 89dfecaa1a..275d5813af 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb @@ -30,12 +30,11 @@ module Actions def delete_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb index 22301e8806..10083183a8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb @@ -30,12 +30,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html # def delete_expired_data(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb index 1e0ad93bde..ba60347853 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb @@ -29,12 +29,11 @@ module Actions def delete_filter(arguments = {}) raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb index 2a16490ea8..9b6ab09196 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb @@ -32,12 +32,11 @@ module Actions def delete_forecast(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _job_id = arguments.delete(:job_id) _forecast_id = arguments.delete(:forecast_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb index 6df8c50a8d..e0be877f98 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_job.rb @@ -31,12 +31,11 @@ module Actions def delete_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb index 59e43de966..3d57482bb6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb @@ -31,12 +31,11 @@ def delete_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb index 3f7e19ce68..1b4d068b15 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb @@ -29,12 +29,11 @@ module Actions def delete_trained_model(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb index bdd97c9c84..739771e16e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb @@ -31,12 +31,11 @@ def delete_trained_model_alias(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _model_alias = arguments.delete(:model_alias) _model_id = arguments.delete(:model_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb index d3779cc7d5..25096c2574 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb @@ -29,11 +29,10 @@ module Actions def estimate_model_memory(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/_estimate_model_memory" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb index 4e59ab6a97..5118070527 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb @@ -29,11 +29,10 @@ module Actions def evaluate_data_frame(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_ml/data_frame/_evaluate" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index 814f44cb0a..3cb95ec76e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -28,12 +28,11 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html # def explain_data_frame_analytics(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb index 698ded4671..7bf939d38c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/flush_job.rb @@ -35,12 +35,11 @@ module Actions def flush_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb index 32a05d455d..777a26b7d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/forecast.rb @@ -33,12 +33,11 @@ module Actions def forecast(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index e534208dac..4e6b5e9001 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -40,12 +40,11 @@ module Actions def get_buckets(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) _timestamp = arguments.delete(:timestamp) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb index 1b24e38982..dce4cfc25f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb @@ -34,12 +34,11 @@ module Actions def get_calendar_events(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index 9dde87e10d..7511572d10 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -30,12 +30,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html # def get_calendars(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _calendar_id = arguments.delete(:calendar_id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index 8f0274fde7..08ded63d94 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -34,12 +34,11 @@ module Actions def get_categories(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) _category_id = arguments.delete(:category_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb index c836f25d8b..ef280d1a2b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb @@ -31,12 +31,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html # def get_data_frame_analytics(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb index d389e1a7b3..323c4e76e9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb @@ -31,12 +31,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html # def get_data_frame_analytics_stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb index 4553a9242d..3ee2cd36e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html # def get_datafeed_stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb index efa087b090..043e017389 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb @@ -30,12 +30,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html # def get_datafeeds(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb index 0c8d3f9cf0..c71cc7b25f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_filters.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html # def get_filters(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index eea1920573..332f18c873 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -38,12 +38,11 @@ module Actions def get_influencers(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb index acc2bf8906..626740ab38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html # def get_job_stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb index 6c453630a3..362243ca61 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb @@ -30,12 +30,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html # def get_jobs(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb index 3c4cb0b881..01a5c734f3 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb @@ -32,12 +32,11 @@ def get_model_snapshot_upgrade_stats(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index 5d17dd3b17..76448aef4f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -37,12 +37,11 @@ module Actions def get_model_snapshots(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index 214a54fe95..a7f174456f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -38,12 +38,11 @@ module Actions def get_overall_buckets(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index 8442b4228a..a64f6677c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -38,12 +38,11 @@ module Actions def get_records(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb index 5731cc4666..8e33f4f765 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb @@ -35,12 +35,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html # def get_trained_models(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb index d2fe614654..cce888c29d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb @@ -30,12 +30,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html # def get_trained_models_stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment.rb index ef9640eeba..76f17670f6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment.rb @@ -36,12 +36,11 @@ def infer_trained_model_deployment(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb index f50e4129ab..4334979615 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/info.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html # def info(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_ml/info" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb index adc25950d2..787cff0cb6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/open_job.rb @@ -30,12 +30,11 @@ module Actions def open_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb index fd2e2721c9..d36f5e942a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb @@ -31,12 +31,11 @@ def post_calendar_events(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb index 14aa4863a9..97d97d53cc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/post_data.rb @@ -33,12 +33,11 @@ def post_data(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index dd6ee45b12..33c2b2dbf8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -28,12 +28,11 @@ module Actions # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html # def preview_data_frame_analytics(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index bef36a70dc..5dc2d2ee8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -28,12 +28,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html # def preview_datafeed(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _datafeed_id = arguments.delete(:datafeed_id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb index efb227ccfd..e69ec02cad 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb @@ -30,12 +30,11 @@ module Actions def put_calendar(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _calendar_id = arguments.delete(:calendar_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb index fa3e570535..fd66d32b9a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb @@ -31,12 +31,11 @@ def put_calendar_job(arguments = {}) raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _calendar_id = arguments.delete(:calendar_id) _job_id = arguments.delete(:job_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb index b5baadd85f..bee400ce71 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb @@ -31,12 +31,11 @@ def put_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb index 1c3dc6c346..675b921d12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb @@ -35,12 +35,11 @@ def put_datafeed(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb index a1cce8057e..938a7515b6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_filter.rb @@ -31,12 +31,11 @@ def put_filter(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb index 50715fcce3..8954672af4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_job.rb @@ -35,12 +35,11 @@ def put_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb index 0ed8edbd44..2850848ddb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb @@ -32,12 +32,11 @@ def put_trained_model(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb index e262408fcb..f1f836e373 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb @@ -32,12 +32,11 @@ def put_trained_model_alias(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _model_alias = arguments.delete(:model_alias) _model_id = arguments.delete(:model_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb index 1132c4c04e..99f25fb5a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb @@ -37,12 +37,11 @@ def put_trained_model_definition_part(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] raise ArgumentError, "Required argument 'part' missing" unless arguments[:part] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _model_id = arguments.delete(:model_id) _part = arguments.delete(:part) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb index 111563a6c8..a72cce627f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb @@ -35,12 +35,11 @@ def put_trained_model_vocabulary(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb index f7b05e090b..c917c70082 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/reset_job.rb @@ -30,12 +30,11 @@ module Actions def reset_job(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb index 13f3cfb999..2d7ff7d174 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb @@ -33,12 +33,11 @@ def revert_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb index 6f7fdf912b..6057b8e4b1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html # def set_upgrade_mode(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_ml/set_upgrade_mode" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb index a112a51cc3..066e9aa4be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb @@ -31,12 +31,11 @@ module Actions def start_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb index 1b5d006003..74ecd2b10d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb @@ -33,12 +33,11 @@ module Actions def start_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb index d00469ce9e..1147a19b51 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb @@ -35,12 +35,11 @@ module Actions def start_trained_model_deployment(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb index 56a2ac5232..faf0c13821 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb @@ -33,12 +33,11 @@ module Actions def stop_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb index 31a39945c6..45485452b4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb @@ -34,12 +34,11 @@ module Actions def stop_datafeed(arguments = {}) raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb index 0758afcba0..919bff8df6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb @@ -33,17 +33,16 @@ module Actions def stop_trained_model_deployment(arguments = {}) raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = arguments.delete(:body) _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_POST path = "_ml/trained_models/#{Utils.__listify(_model_id)}/deployment/_stop" - params = {} + params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb index 12828b370a..18c40acff8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb @@ -31,12 +31,11 @@ def update_data_frame_analytics(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb index 4633a02438..1bfe3d3427 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb @@ -35,12 +35,11 @@ def update_datafeed(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _datafeed_id = arguments.delete(:datafeed_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb index 8e0b95575a..ffc105c47c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_filter.rb @@ -31,12 +31,11 @@ def update_filter(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _filter_id = arguments.delete(:filter_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb index 38841aa7e8..1150f64b8c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_job.rb @@ -31,12 +31,11 @@ def update_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb index 4cefba490e..09a262ea53 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb @@ -33,12 +33,11 @@ def update_model_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb index 19f82f89a0..1e6abbfd46 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb @@ -33,12 +33,11 @@ def upgrade_job_snapshot(arguments = {}) raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id] raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _job_id = arguments.delete(:job_id) _snapshot_id = arguments.delete(:snapshot_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb index 098957e4fb..ce4026ee71 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate.rb @@ -29,11 +29,10 @@ module Actions def validate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/_validate" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb index f987052dbd..a10967b525 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb @@ -29,11 +29,10 @@ module Actions def validate_detector(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_ml/anomaly_detectors/_validate/detector" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb index 3c59872194..4bb2dde088 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mget.rb @@ -37,11 +37,10 @@ module Actions def mget(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb index 1564c0c9dc..fd85d482d6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/deprecations.rb @@ -27,11 +27,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html # def deprecations(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb index 80412fe3fc..bb44502c3a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html # def get_feature_upgrade_status(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_migration/system_features" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb index 6dc6d29a5a..9c78d900e8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html # def post_feature_upgrade(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_migration/system_features" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb index e6744536bf..40a62b5cb8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/monitoring/bulk.rb @@ -39,12 +39,11 @@ module Actions def bulk(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _type = arguments.delete(:type) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb index f245497993..d6c4cec916 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb @@ -36,11 +36,10 @@ module Actions def msearch(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb index a982a09785..e79dab2fc1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb @@ -34,11 +34,10 @@ module Actions def msearch_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index 939d756d59..aff2d15020 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -39,6 +39,7 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html # def mtermvectors(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = if (ids = arguments.delete(:ids)) @@ -47,8 +48,6 @@ def mtermvectors(arguments = {}) arguments.delete(:body) end - arguments = arguments.clone - _index = arguments.delete(:index) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb index f5761d88da..8455dd437b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb @@ -37,12 +37,11 @@ def clear_repositories_metering_archive(arguments = {}) raise ArgumentError, "Required argument 'max_archive_version' missing" unless arguments[:max_archive_version] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) _max_archive_version = arguments.delete(:max_archive_version) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb index b58ff14843..aa6c694529 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb @@ -33,12 +33,11 @@ module Actions def get_repositories_metering_info(arguments = {}) raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb index c7018f85de..6fa0c91e49 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/hot_threads.rb @@ -33,12 +33,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html # def hot_threads(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb index 0be3117564..6af842eda0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/info.rb @@ -30,12 +30,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html # def info(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) _metric = arguments.delete(:metric) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb index 5bb0d6fda5..c96d4ded48 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings # def reload_secure_settings(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb index 8dd55a727a..e8468b5271 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/stats.rb @@ -38,12 +38,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html # def stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) _metric = arguments.delete(:metric) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb index fe9fd73743..519049419f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/nodes/usage.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html # def usage(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) _metric = arguments.delete(:metric) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index 1a96f29f7a..6375678b42 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -33,11 +33,10 @@ module Actions def open_point_in_time(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb index 78a542df1c..9595d1b501 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ping.rb @@ -25,11 +25,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html # def ping(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_HEAD path = "" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb index bfcb85fe32..263976c4b8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/put_script.rb @@ -33,12 +33,11 @@ def put_script(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) _context = arguments.delete(:context) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb index 16ede62a46..f3fe1a4108 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rank_eval.rb @@ -33,11 +33,10 @@ module Actions def rank_eval(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index e55375edb6..df9094002a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -38,11 +38,10 @@ module Actions def reindex(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_reindex" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb index ab6f4ae0bb..aadb314dd7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex_rethrottle.rb @@ -29,12 +29,11 @@ module Actions def reindex_rethrottle(arguments = {}) raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb index d03a495768..eabb1bdafc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/render_search_template.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html # def render_search_template(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb index 9f30aa3193..741a669066 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/delete_job.rb @@ -33,12 +33,11 @@ module Actions def delete_job(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb index 9d10fc96c4..5bb40a0bfe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_jobs.rb @@ -31,12 +31,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html # def get_jobs(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb index d7b1fc3e7a..9f933a13ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb @@ -31,12 +31,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html # def get_rollup_caps(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb index 1569faced2..fa140f77a6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb @@ -33,11 +33,10 @@ module Actions def get_rollup_index_caps(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb index 231461e2bd..01f2fcd55c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/put_job.rb @@ -35,12 +35,11 @@ def put_job(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup.rb index 5c58296636..112e101295 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup.rb @@ -37,11 +37,10 @@ def rollup(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'rollup_index' missing" unless arguments[:rollup_index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb index 1f55bef829..9ed64baecf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/rollup_search.rb @@ -37,11 +37,10 @@ def rollup_search(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb index 95c029a235..b4b40d9b38 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/start_job.rb @@ -33,12 +33,11 @@ module Actions def start_job(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb index 3338bb2860..eabd61b38b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/rollup/stop_job.rb @@ -35,12 +35,11 @@ module Actions def stop_job(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb index 655d3cbcd0..e00af21bbd 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scripts_painless_execute.rb @@ -30,11 +30,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html # def scripts_painless_execute(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index d45e1326c4..da9fb99b41 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -34,12 +34,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll # def scroll(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _scroll_id = arguments.delete(:scroll_id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index 1e514dccf6..952f0548ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -70,11 +70,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html # def search(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone arguments[:index] = UNDERSCORE_ALL if !arguments[:index] && arguments[:type] _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index cfe3216742..9ea4589f59 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -47,11 +47,10 @@ def search_mvt(arguments = {}) raise ArgumentError, "Required argument 'x' missing" unless arguments[:x] raise ArgumentError, "Required argument 'y' missing" unless arguments[:y] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb index 44f9a8bbbd..6eadf146d2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_shards.rb @@ -32,11 +32,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html # def search_shards(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb index 04cf1107ac..2ec86f3062 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_template.rb @@ -42,11 +42,10 @@ module Actions def search_template(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb index e9e9a654cb..b49dfe8f8b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb @@ -31,12 +31,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html # def cache_stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index 069125329c..1b40374cde 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -34,11 +34,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html # def clear_cache(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb index 837ea0dc67..369538ac08 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb @@ -36,12 +36,11 @@ def mount(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _repository = arguments.delete(:repository) _snapshot = arguments.delete(:snapshot) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb index 71c7cc7880..1126655518 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html # def stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb index 95fbe1176a..a5aaf6e119 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/authenticate.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html # def authenticate(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_security/_authenticate" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb index 6908b3585b..a2ee2ac16f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/change_password.rb @@ -31,12 +31,11 @@ module Actions def change_password(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb index 878a0c0dc2..d63efc50ae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb @@ -29,11 +29,10 @@ module Actions def clear_api_key_cache(arguments = {}) raise ArgumentError, "Required argument 'ids' missing" unless arguments[:ids] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil _ids = arguments.delete(:ids) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb index b87c7bbb33..a81eaf96b9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb @@ -29,12 +29,11 @@ module Actions def clear_cached_privileges(arguments = {}) raise ArgumentError, "Required argument 'application' missing" unless arguments[:application] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _application = arguments.delete(:application) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb index f0355a372e..649c78a575 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_realms.rb @@ -30,12 +30,11 @@ module Actions def clear_cached_realms(arguments = {}) raise ArgumentError, "Required argument 'realms' missing" unless arguments[:realms] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _realms = arguments.delete(:realms) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb index e445748137..bee7c37faf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_roles.rb @@ -29,12 +29,11 @@ module Actions def clear_cached_roles(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb index e028b5c35c..889412c41c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb @@ -33,12 +33,11 @@ def clear_cached_service_tokens(arguments = {}) raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _namespace = arguments.delete(:namespace) _service = arguments.delete(:service) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb index c45c25a62e..fbaa194b04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_api_key.rb @@ -30,11 +30,10 @@ module Actions def create_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT path = "_security/api_key" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index 97a728f9e4..24decddfe1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -33,12 +33,11 @@ def create_service_token(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _namespace = arguments.delete(:namespace) _service = arguments.delete(:service) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb index 6ae0eeff41..45de1f7267 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_privileges.rb @@ -32,12 +32,11 @@ def delete_privileges(arguments = {}) raise ArgumentError, "Required argument 'application' missing" unless arguments[:application] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _application = arguments.delete(:application) _name = arguments.delete(:name) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb index 15b454bc4d..30eab02aa2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role.rb @@ -30,12 +30,11 @@ module Actions def delete_role(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb index 86fec4059b..77eb182c52 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_role_mapping.rb @@ -30,12 +30,11 @@ module Actions def delete_role_mapping(arguments = {}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index 3cad276428..b2fee6869c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -34,12 +34,11 @@ def delete_service_token(arguments = {}) raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _namespace = arguments.delete(:namespace) _service = arguments.delete(:service) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb index fa7a7faa41..b74afe3171 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user.rb @@ -30,12 +30,11 @@ module Actions def delete_user(arguments = {}) raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb index 507f381381..b3f66bfc7f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/disable_user.rb @@ -30,12 +30,11 @@ module Actions def disable_user(arguments = {}) raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb index f6d5acad85..41f53e74ba 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enable_user.rb @@ -30,12 +30,11 @@ module Actions def enable_user(arguments = {}) raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb index a0c4437de8..9bfa751bf1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_kibana.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-kibana-enrollment.html # def enroll_kibana(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_security/enroll/kibana" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb index 71367ac835..9400427ac9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/enroll_node.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-node-enrollment.html # def enroll_node(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_security/enroll/node" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb index 05e376e692..56c864a800 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_api_key.rb @@ -31,11 +31,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html # def get_api_key(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_security/api_key" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb index c6f836d851..ca95b58abb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-builtin-privileges.html # def get_builtin_privileges(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_security/privilege/_builtin" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb index 5a2a994b25..74b95dcb0f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_privileges.rb @@ -28,12 +28,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html # def get_privileges(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _application = arguments.delete(:application) _name = arguments.delete(:name) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb index 28f18b05d0..fe49b785bf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html # def get_role(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb index 9056bcad17..6b0d4d0e92 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_role_mapping.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html # def get_role_mapping(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index 595d4c3cb1..e07bb523e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -28,12 +28,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html # def get_service_accounts(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _namespace = arguments.delete(:namespace) _service = arguments.delete(:service) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb index d305fd9721..eb3c70fe94 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_credentials.rb @@ -31,12 +31,11 @@ def get_service_credentials(arguments = {}) raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _namespace = arguments.delete(:namespace) _service = arguments.delete(:service) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb index 1bfbcfb67b..3e56a908c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_token.rb @@ -29,11 +29,10 @@ module Actions def get_token(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_security/oauth2/token" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb index 36f2ef7dd6..87f406bd27 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html # def get_user(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb index c6c10c69b7..e801b1f886 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_user_privileges.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html # def get_user_privileges(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_security/user/_privileges" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb index 5a64423f78..13ed931b1a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/grant_api_key.rb @@ -30,11 +30,10 @@ module Actions def grant_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_security/api_key/grant" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb index 84a26ddb0c..856ca54009 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb @@ -30,12 +30,11 @@ module Actions def has_privileges(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _user = arguments.delete(:user) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb index 3cbc197d77..ed552b55be 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_api_key.rb @@ -29,11 +29,10 @@ module Actions def invalidate_api_key(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE path = "_security/api_key" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb index 0fdbafe730..c06400b82f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/invalidate_token.rb @@ -29,11 +29,10 @@ module Actions def invalidate_token(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_DELETE path = "_security/oauth2/token" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb index 80dc79674f..40d4f2c89a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_privileges.rb @@ -30,11 +30,10 @@ module Actions def put_privileges(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_PUT path = "_security/privilege" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb index 48c4e61cdc..7208e0b23c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role.rb @@ -32,12 +32,11 @@ def put_role(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb index a128308edc..cf991ac50b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_role_mapping.rb @@ -32,12 +32,11 @@ def put_role_mapping(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb index e3c801eec7..1eed3dba12 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user.rb @@ -32,12 +32,11 @@ def put_user(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'username' missing" unless arguments[:username] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _username = arguments.delete(:username) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index 0f709f8f6c..4a4aa3aa3b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -27,11 +27,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html # def query_api_keys(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb index ed4b3144f0..2fc810844a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_authenticate.rb @@ -29,11 +29,10 @@ module Actions def saml_authenticate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_security/saml/authenticate" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb index 0dafc4d6c8..bb246f5ff6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_complete_logout.rb @@ -29,11 +29,10 @@ module Actions def saml_complete_logout(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_security/saml/complete_logout" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb index e59c11db3d..3ffc0fe36b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_invalidate.rb @@ -29,11 +29,10 @@ module Actions def saml_invalidate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_security/saml/invalidate" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb index f4663647c6..f99fa0d351 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_logout.rb @@ -29,11 +29,10 @@ module Actions def saml_logout(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_security/saml/logout" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb index 8b95ca98ef..625fa3f67b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb @@ -29,11 +29,10 @@ module Actions def saml_prepare_authentication(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_security/saml/prepare" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb index cf8d607823..1789377197 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb @@ -29,12 +29,11 @@ module Actions def saml_service_provider_metadata(arguments = {}) raise ArgumentError, "Required argument 'realm_name' missing" unless arguments[:realm_name] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _realm_name = arguments.delete(:realm_name) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb index ebd34851a0..b3cb6e5a93 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/delete_node.rb @@ -29,12 +29,11 @@ module Actions def delete_node(arguments = {}) raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb index ef8ea430d4..7d5a29e589 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/get_node.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current # def get_node(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb index c21a3ed209..da54f21cd1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/shutdown/put_node.rb @@ -31,12 +31,11 @@ def put_node(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'node_id' missing" unless arguments[:node_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb index 34cabc1a54..f66c1578d9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb @@ -31,12 +31,11 @@ module Actions def cleanup_repository(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb index 45ec54a094..4e1e5aefa7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/clone.rb @@ -36,12 +36,11 @@ def clone(arguments = {}) raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] raise ArgumentError, "Required argument 'target_snapshot' missing" unless arguments[:target_snapshot] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _repository = arguments.delete(:repository) _snapshot = arguments.delete(:snapshot) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb index 2b8d9ac055..fe63b4c8f4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create.rb @@ -34,12 +34,11 @@ def create(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _repository = arguments.delete(:repository) _snapshot = arguments.delete(:snapshot) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb index be5c08d164..2af7c28493 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/create_repository.rb @@ -34,12 +34,11 @@ def create_repository(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index d56e54431b..f10ec148d0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -32,12 +32,11 @@ def delete(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _repository = arguments.delete(:repository) _snapshot = arguments.delete(:snapshot) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb index 657e21608c..446ee4267f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete_repository.rb @@ -31,12 +31,11 @@ module Actions def delete_repository(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb index f0b9c99c98..7b4ed1a149 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get.rb @@ -36,12 +36,11 @@ def get(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _repository = arguments.delete(:repository) _snapshot = arguments.delete(:snapshot) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb index cb0bee889c..aa5e0a6872 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/get_repository.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html # def get_repository(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb index f4472a79e0..7a900ad81f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb @@ -40,12 +40,11 @@ module Actions def repository_analyze(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb index edfd661d48..7ffba80b8f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/restore.rb @@ -34,12 +34,11 @@ def restore(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _repository = arguments.delete(:repository) _snapshot = arguments.delete(:snapshot) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb index 6259e8ee32..4b9522caac 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/status.rb @@ -30,12 +30,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html # def status(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _repository = arguments.delete(:repository) _snapshot = arguments.delete(:snapshot) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb index 3c241d24ef..cf73952ecf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/verify_repository.rb @@ -31,12 +31,11 @@ module Actions def verify_repository(arguments = {}) raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _repository = arguments.delete(:repository) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb index d44bfb229b..a29878183f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb @@ -29,12 +29,11 @@ module Actions def delete_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb index 330a6806db..7407951ddf 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb @@ -29,12 +29,11 @@ module Actions def execute_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb index ea10fbd63a..b35af6820f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html # def execute_retention(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_slm/_execute_retention" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb index 999f667317..ef9e3f5e9f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb @@ -27,12 +27,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html # def get_lifecycle(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb index 8ccf7a15fb..f758653c5c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html # def get_stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_slm/stats" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb index be3ae68bd3..4e93dd7138 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html # def get_status(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_slm/status" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb index ecca8f6328..e2cc2b98ea 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb @@ -30,12 +30,11 @@ module Actions def put_lifecycle(arguments = {}) raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb index 1bcdedbf58..c3a9e07236 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html # def start(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_slm/start" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb index 8200e20248..853433796a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html # def stop(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_slm/stop" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb index ed1879dfef..827d6402e4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/clear_cursor.rb @@ -29,11 +29,10 @@ module Actions def clear_cursor(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_sql/close" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb index 743ee22fbb..669658e10e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/delete_async.rb @@ -29,12 +29,11 @@ module Actions def delete_async(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb index 8e8cc491ca..64591d559d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async.rb @@ -33,12 +33,11 @@ module Actions def get_async(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb index 923ad36ea9..87302140f8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/get_async_status.rb @@ -29,12 +29,11 @@ module Actions def get_async_status(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb index 1088253289..7a8c0b3c66 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/query.rb @@ -30,11 +30,10 @@ module Actions def query(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_sql" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb index 72fbe7b873..2c0dd62b7b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/sql/translate.rb @@ -29,11 +29,10 @@ module Actions def translate(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_sql/translate" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb index 25ef0a53a5..7a919e25ce 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/ssl/certificates.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html # def certificates(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_ssl/certificates" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb index d489026e44..f3ca5df99c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/cancel.rb @@ -35,12 +35,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html # def cancel(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb index 0d9acb279c..49f6e0053c 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/get.rb @@ -33,12 +33,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html # def get(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb index e577c9e063..2dde1bb844 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/tasks/list.rb @@ -37,11 +37,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html # def list(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_tasks" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb index 818993875f..05e0935627 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/terms_enum.rb @@ -29,11 +29,10 @@ module Actions def terms_enum(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb index e5cd055d1d..bb75372536 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/termvectors.rb @@ -41,11 +41,10 @@ module Actions def termvectors(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb index 5c1d350ea8..9419dc902b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/text_structure/find_structure.rb @@ -43,11 +43,10 @@ module Actions def find_structure(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = Elasticsearch::API::HTTP_POST path = "_text_structure/find_structure" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb index be820fe0e0..7616cfd3e2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/delete_transform.rb @@ -31,12 +31,11 @@ module Actions def delete_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb index ff03a3d10e..22e5b33b76 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform.rb @@ -31,12 +31,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html # def get_transform(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb index 058b95e9cc..42299ade26 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/get_transform_stats.rb @@ -32,12 +32,11 @@ module Actions def get_transform_stats(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index f3c851a6fa..b192a1fc04 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html # def preview_transform(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _transform_id = arguments.delete(:transform_id) method = if body diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb index 9a128bd74b..64891af0c4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/put_transform.rb @@ -33,12 +33,11 @@ def put_transform(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb index 85600d1285..a7a1282987 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/start_transform.rb @@ -30,12 +30,11 @@ module Actions def start_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb index 8bd65b0699..27e0c48cb5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/stop_transform.rb @@ -34,12 +34,11 @@ module Actions def stop_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb index b6b60682ce..5ef298f12f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/update_transform.rb @@ -33,12 +33,11 @@ def update_transform(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb index 1df32597bc..ce26fe9999 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html # def upgrade_transforms(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_transform/_upgrade" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb index 719faad11b..48fe04697e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update.rb @@ -44,12 +44,11 @@ def update(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb index be81058c14..cd02b2b2dc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query.rb @@ -61,11 +61,10 @@ module Actions def update_by_query(arguments = {}) raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) _index = arguments.delete(:index) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb index 5efa69e8ec..f3cba5faeb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb @@ -29,12 +29,11 @@ module Actions def update_by_query_rethrottle(arguments = {}) raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _task_id = arguments.delete(:task_id) method = Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb index 56fe8711ad..bfc1c565cb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/ack_watch.rb @@ -30,12 +30,11 @@ module Actions def ack_watch(arguments = {}) raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _watch_id = arguments.delete(:watch_id) _action_id = arguments.delete(:action_id) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb index 635ee8aa26..a08edc9649 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/activate_watch.rb @@ -29,12 +29,11 @@ module Actions def activate_watch(arguments = {}) raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _watch_id = arguments.delete(:watch_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb index 1f4ec23da6..3b18fbc9d5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb @@ -29,12 +29,11 @@ module Actions def deactivate_watch(arguments = {}) raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _watch_id = arguments.delete(:watch_id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb index 6ec9341499..addb22c5ab 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/delete_watch.rb @@ -29,12 +29,11 @@ module Actions def delete_watch(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_DELETE diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb index ada1700e9f..7287ffdcfe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/execute_watch.rb @@ -29,12 +29,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html # def execute_watch(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb index c0c3eaba56..21e9a07abb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/get_watch.rb @@ -29,12 +29,11 @@ module Actions def get_watch(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb index 75b06231ec..387e9f445f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/put_watch.rb @@ -34,12 +34,11 @@ module Actions def put_watch(arguments = {}) raise ArgumentError, "Required argument 'id' missing" unless arguments[:id] + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) - arguments = arguments.clone - _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_PUT diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index bbeaf8411b..325041fff6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -27,11 +27,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-query-watches.html # def query_watches(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = arguments.delete(:body) - - arguments = arguments.clone + body = arguments.delete(:body) method = if body Elasticsearch::API::HTTP_POST diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb index 41991676ee..d6b05e63f1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/start.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html # def start(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_watcher/_start" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb index e844c7b91f..5eacddd3c8 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stats.rb @@ -28,12 +28,11 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html # def stats(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil - arguments = arguments.clone - _metric = arguments.delete(:metric) method = Elasticsearch::API::HTTP_GET diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb index df63742580..a5d6d33c07 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/stop.rb @@ -26,11 +26,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html # def stop(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_POST path = "_watcher/_stop" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb index 0f473cdce4..6ff91cd122 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb @@ -28,11 +28,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html # def info(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_xpack" diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb index 1a998261a8..61cb6bc87e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb @@ -27,11 +27,10 @@ module Actions # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html # def usage(arguments = {}) + arguments = arguments.clone headers = arguments.delete(:headers) || {} - body = nil - - arguments = arguments.clone + body = nil method = Elasticsearch::API::HTTP_GET path = "_xpack/usage"