From dc80df696ba6ca683598fc9b647b803af0444b07 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Thu, 7 Jan 2021 16:31:29 +0000 Subject: [PATCH] Code gen for NEST to support backporting APIs --- src/ApiGenerator/last_downloaded_version.txt | 2 +- src/Nest/Descriptors.AsyncSearch.cs | 4 ++-- src/Nest/Descriptors.Cat.cs | 14 ++++++++----- src/Nest/Requests.Cat.cs | 22 +++++++++++++------- src/Nest/Requests.Indices.cs | 4 ++-- src/Nest/Requests.Nodes.cs | 4 ++-- src/Nest/Requests.Tasks.cs | 3 +++ 7 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/ApiGenerator/last_downloaded_version.txt b/src/ApiGenerator/last_downloaded_version.txt index c373f67e4bb..59c977f3138 100644 --- a/src/ApiGenerator/last_downloaded_version.txt +++ b/src/ApiGenerator/last_downloaded_version.txt @@ -1 +1 @@ -f2651e47639aba972f4ad0d653907fafcff9d316 \ No newline at end of file +963c3284b354553b9097ad9e2f3cd31e411c239a \ No newline at end of file diff --git a/src/Nest/Descriptors.AsyncSearch.cs b/src/Nest/Descriptors.AsyncSearch.cs index 2631ad21ff8..95d56f93502 100644 --- a/src/Nest/Descriptors.AsyncSearch.cs +++ b/src/Nest/Descriptors.AsyncSearch.cs @@ -21,8 +21,8 @@ using System.Text; using System.Linq.Expressions; using Elastic.Transport; -using Elasticsearch.Net; using Nest.Utf8Json; +using Elasticsearch.Net; using Elasticsearch.Net.Specification.AsyncSearchApi; // ReSharper disable RedundantBaseConstructorCall @@ -173,4 +173,4 @@ public AsyncSearchSubmitDescriptor Index() ///Specify the time that the request should block waiting for the final response public AsyncSearchSubmitDescriptor WaitForCompletionTimeout(Time waitforcompletiontimeout) => Qs("wait_for_completion_timeout", waitforcompletiontimeout); } -} \ No newline at end of file +} diff --git a/src/Nest/Descriptors.Cat.cs b/src/Nest/Descriptors.Cat.cs index b5145d50507..e2ad98d2fdd 100644 --- a/src/Nest/Descriptors.Cat.cs +++ b/src/Nest/Descriptors.Cat.cs @@ -357,7 +357,8 @@ public CatDatafeedsDescriptor(Id datafeedId): base(r => r.Optional("datafeed_id" ///The ID of the datafeeds stats to fetch public CatDatafeedsDescriptor DatafeedId(Id datafeedId) => Assign(datafeedId, (a, v) => a.RouteValues.Optional("datafeed_id", v)); // Request parameters - ///Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) [Obsolete("Scheduled to be removed in 7.0, deprecated")] + ///Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + [Obsolete("Scheduled to be removed in 8.0, deprecated")] public CatDatafeedsDescriptor AllowNoDatafeeds(bool? allownodatafeeds = true) => Qs("allow_no_datafeeds", allownodatafeeds); ///Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) public CatDatafeedsDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch); @@ -395,7 +396,8 @@ public CatJobsDescriptor(Id jobId): base(r => r.Optional("job_id", jobId)) ///The ID of the jobs stats to fetch public CatJobsDescriptor JobId(Id jobId) => Assign(jobId, (a, v) => a.RouteValues.Optional("job_id", v)); // Request parameters - ///Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) [Obsolete("Scheduled to be removed in 7.0, deprecated")] + ///Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + [Obsolete("Scheduled to be removed in 8.0, deprecated")] public CatJobsDescriptor AllowNoJobs(bool? allownojobs = true) => Qs("allow_no_jobs", allownojobs); ///Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) public CatJobsDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch); @@ -543,6 +545,8 @@ public partial class CatPluginsDescriptor : RequestDescriptorBase Qs("h", headers); ///Return help information public CatPluginsDescriptor Help(bool? help = true) => Qs("help", help); + ///Include bootstrap plugins in the response + public CatPluginsDescriptor IncludeBootstrap(bool? includebootstrap = true) => Qs("include_bootstrap", includebootstrap); ///Return local information, do not retrieve the state from master node (default: false) public CatPluginsDescriptor Local(bool? local = true) => Qs("local", local); ///Explicit operation timeout for connection to master node @@ -763,9 +767,9 @@ public partial class CatTasksDescriptor : RequestDescriptorBaseReturn help information public CatTasksDescriptor Help(bool? help = true) => Qs("help", help); ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - public CatTasksDescriptor NodeId(params string[] nodeid) => Qs("node_id", nodeid); - ///Return tasks with specified parent task id. Set to -1 to return all. - public CatTasksDescriptor ParentTask(long? parenttask) => Qs("parent_task", parenttask); + public CatTasksDescriptor Nodes(params string[] nodes) => Qs("nodes", nodes); + ///Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. + public CatTasksDescriptor ParentTaskId(string parenttaskid) => Qs("parent_task_id", parenttaskid); ///Comma-separated list of column names or column aliases to sort by public CatTasksDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); ///Verbose mode. Display column headers diff --git a/src/Nest/Requests.Cat.cs b/src/Nest/Requests.Cat.cs index b8fc8fcae3a..44b8542cfd2 100644 --- a/src/Nest/Requests.Cat.cs +++ b/src/Nest/Requests.Cat.cs @@ -1254,6 +1254,13 @@ public bool? Help set => Q("help", value); } + ///Include bootstrap plugins in the response + public bool? IncludeBootstrap + { + get => Q("include_bootstrap"); + set => Q("include_bootstrap", value); + } + ///Return local information, do not retrieve the state from master node (default: false) public bool? Local { @@ -1701,6 +1708,7 @@ public partial interface ICatTasksRequest : IRequest } ///Request for Tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class CatTasksRequest : PlainRequestBase, ICatTasksRequest { protected ICatTasksRequest Self => this; @@ -1752,17 +1760,17 @@ public bool? Help /// A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're /// connecting to, leave empty to get information from all nodes /// - public string[] NodeId + public string[] Nodes { - get => Q("node_id"); - set => Q("node_id", value); + get => Q("nodes"); + set => Q("nodes", value); } - ///Return tasks with specified parent task id. Set to -1 to return all. - public long? ParentTask + ///Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. + public string ParentTaskId { - get => Q("parent_task"); - set => Q("parent_task", value); + get => Q("parent_task_id"); + set => Q("parent_task_id", value); } ///Comma-separated list of column names or column aliases to sort by diff --git a/src/Nest/Requests.Indices.cs b/src/Nest/Requests.Indices.cs index 88b0aa7b5af..9b01908fc4d 100644 --- a/src/Nest/Requests.Indices.cs +++ b/src/Nest/Requests.Indices.cs @@ -2643,7 +2643,7 @@ public IndicesStatsRequest(Indices index, Metrics metric): base(r => r.Optional( [IgnoreDataMember] Indices IIndicesStatsRequest.Index => Self.RouteValues.Get("index"); // Request parameters - ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + ///A comma-separated list of fields for the `completion` index metric (supports wildcards) public Fields CompletionFields { get => Q("completion_fields"); @@ -2657,7 +2657,7 @@ public ExpandWildcards? ExpandWildcards set => Q("expand_wildcards", value); } - ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) + ///A comma-separated list of fields for the `fielddata` index metric (supports wildcards) public Fields FielddataFields { get => Q("fielddata_fields"); diff --git a/src/Nest/Requests.Nodes.cs b/src/Nest/Requests.Nodes.cs index 90ba09159cd..5e3e08746b0 100644 --- a/src/Nest/Requests.Nodes.cs +++ b/src/Nest/Requests.Nodes.cs @@ -291,14 +291,14 @@ public NodesStatsRequest(NodeIds nodeId, Metrics metric, IndexMetrics indexMetri [IgnoreDataMember] IndexMetrics INodesStatsRequest.IndexMetric => Self.RouteValues.Get("index_metric"); // Request parameters - ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + ///A comma-separated list of fields for the `completion` index metric (supports wildcards) public Fields CompletionFields { get => Q("completion_fields"); set => Q("completion_fields", value); } - ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) + ///A comma-separated list of fields for the `fielddata` index metric (supports wildcards) public Fields FielddataFields { get => Q("fielddata_fields"); diff --git a/src/Nest/Requests.Tasks.cs b/src/Nest/Requests.Tasks.cs index ec7296108bf..9d198e340e2 100644 --- a/src/Nest/Requests.Tasks.cs +++ b/src/Nest/Requests.Tasks.cs @@ -43,6 +43,7 @@ TaskId TaskId } ///Request for Cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class CancelTasksRequest : PlainRequestBase, ICancelTasksRequest { protected ICancelTasksRequest Self => this; @@ -107,6 +108,7 @@ TaskId TaskId } ///Request for GetTask https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class GetTaskRequest : PlainRequestBase, IGetTaskRequest { protected IGetTaskRequest Self => this; @@ -150,6 +152,7 @@ public partial interface IListTasksRequest : IRequestRequest for List https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class ListTasksRequest : PlainRequestBase, IListTasksRequest { protected IListTasksRequest Self => this;