Skip to content

Auto-generated code for 8.19 #2735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Actions
# Retrieves the results of a previously submitted async query request given its ID.
#
# @option arguments [String] :id The async query ID
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response
# @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available
# @option arguments [Boolean] :drop_null_columns Should entirely null columns be removed from the results? Their name and type will be returning in a new `all_columns` section.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module Actions
# Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted.
#
# @option arguments [String] :policy The name of the index lifecycle policy
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-delete-lifecycle.html
Expand All @@ -48,7 +50,7 @@ def delete_lifecycle(arguments = {})

method = Elasticsearch::API::HTTP_DELETE
path = "_ilm/policy/#{Utils.__listify(_policy)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module Actions
# @option arguments [String] :index The name of the index to explain
# @option arguments [Boolean] :only_managed filters the indices included in the response to ones managed by ILM
# @option arguments [Boolean] :only_errors filters the indices included in the response to ones in an ILM error state, implies only_managed
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-explain-lifecycle.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module Actions
# Returns the specified policy definition. Includes the policy version and last modified date.
#
# @option arguments [String] :policy The name of the index lifecycle policy
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-get-lifecycle.html
Expand All @@ -50,7 +52,7 @@ def get_lifecycle(arguments = {})
else
'_ilm/policy'
end
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module Actions
# Creates a lifecycle policy
#
# @option arguments [String] :policy The name of the index lifecycle policy
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The lifecycle policy definition to register
#
Expand All @@ -49,7 +51,7 @@ def put_lifecycle(arguments = {})

method = Elasticsearch::API::HTTP_PUT
path = "_ilm/policy/#{Utils.__listify(_policy)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ module IndexLifecycleManagement
module Actions
# Start the index lifecycle management (ILM) plugin.
#
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-start.html
Expand All @@ -38,7 +40,7 @@ def start(arguments = {})

method = Elasticsearch::API::HTTP_POST
path = '_ilm/start'
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ module IndexLifecycleManagement
module Actions
# Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin
#
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ilm-stop.html
Expand All @@ -38,7 +40,7 @@ def stop(arguments = {})

method = Elasticsearch::API::HTTP_POST
path = '_ilm/stop'
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
#
module Elasticsearch
module API
module Inference
module Actions
# Configure a custom inference endpoint
#
# @option arguments [String] :task_type The task type
# @option arguments [String] :custom_inference_id The inference Id
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The inference endpoint's task and service settings
#
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-custom
#
def put_custom(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_custom' }

defined_params = %i[task_type custom_inference_id].each_with_object({}) do |variable, set_variables|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
end
request_opts[:defined_params] = defined_params unless defined_params.empty?

raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
raise ArgumentError, "Required argument 'custom_inference_id' missing" unless arguments[:custom_inference_id]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = arguments.delete(:body)

_task_type = arguments.delete(:task_type)

_custom_inference_id = arguments.delete(:custom_inference_id)

method = Elasticsearch::API::HTTP_PUT
path = "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_custom_inference_id)}"
params = {}

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module Actions
# Deletes a geoip database configuration
#
# @option arguments [List] :id A comma-separated list of geoip database configurations to delete
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-geoip-database-api.html
Expand All @@ -48,7 +50,7 @@ def delete_geoip_database(arguments = {})

method = Elasticsearch::API::HTTP_DELETE
path = "_ingest/geoip/database/#{Utils.__listify(_id)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module Actions
# Deletes an ip location database configuration
#
# @option arguments [List] :id A comma-separated list of ip location database configurations to delete
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-ip-location-database-api.html
Expand All @@ -48,7 +50,7 @@ def delete_ip_location_database(arguments = {})

method = Elasticsearch::API::HTTP_DELETE
path = "_ingest/ip_location/database/#{Utils.__listify(_id)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module Actions
# Puts the configuration for a geoip database to be downloaded
#
# @option arguments [String] :id The id of the database configuration
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The database configuration definition (*Required*)
#
Expand All @@ -50,7 +52,7 @@ def put_geoip_database(arguments = {})

method = Elasticsearch::API::HTTP_PUT
path = "_ingest/geoip/database/#{Utils.__listify(_id)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module Actions
# Puts the configuration for a ip location database to be downloaded
#
# @option arguments [String] :id The id of the database configuration
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The database configuration definition (*Required*)
#
Expand All @@ -50,7 +52,7 @@ def put_ip_location_database(arguments = {})

method = Elasticsearch::API::HTTP_PUT
path = "_ingest/ip_location/database/#{Utils.__listify(_id)}"
params = {}
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
6 changes: 6 additions & 0 deletions elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ module Actions
# @option arguments [Number] :max_concurrent_shard_requests The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
# @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response
# @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
# @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled *Deprecated*
# @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 [List] :routing A comma-separated list of specific routing values
# @option arguments [Boolean] :include_named_queries_score Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false)
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The request definitions (metadata-search request definition pairs), separated by newlines (*Required*)
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

require 'spec_helper'

describe 'client#inference.put_custom' do
let(:expected_args) do
[
'PUT',
'_inference/foo/baz',
{},
nil,
{},
{ defined_params: { custom_inference_id: 'baz', task_type: 'foo' },
endpoint: 'inference.put_custom' }
]
end

it 'performs the request' do
expect(client_double.inference.put_custom(task_type: 'foo', custom_inference_id: 'baz')).to be_a Elasticsearch::API::Response
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
end

it 'performs the request' do
expect(client_double.ingest.delete_geoip_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response
expect(client_double.ingest.delete_geoip_database(id: 'foo')).to be_a Elasticsearch::API::Response
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
end

it 'performs the request' do
expect(client_double.ingest.delete_ip_location_database(id: 'foo', body: {})).to be_a Elasticsearch::API::Response
expect(client_double.ingest.delete_ip_location_database(id: 'foo')).to be_a Elasticsearch::API::Response
end
end