Skip to content

[Backport 7.x] Generate NEST Code #5236

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 1 commit into from
Jan 6, 2021
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 @@ -57,8 +57,9 @@
await IncludeAsync("HighLevel/Descriptors/XmlDocs.cshtml", desc);
if(!string.IsNullOrWhiteSpace(param.Obsolete))
{
<text> [Obsolete("Scheduled to be removed in 7.0, @param.Obsolete")]
</text>
<text>
[Obsolete("Scheduled to be removed in 8.0, @param.Obsolete")]
</text>
}
<text>
public @Raw(type) @(param.ClsName)(@param.DescriptorArgumentType @param.ClsArgumentName@tSuffix) => Qs("@original", @(param.ClsArgumentName));
Expand Down
2 changes: 1 addition & 1 deletion src/ApiGenerator/last_downloaded_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c2521f2e747027f7dce03a20200002d6e8513e41
c5c9c1b14918f852399c86da53181f4b6a82e948
46 changes: 31 additions & 15 deletions src/Nest/Descriptors.Cat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public CatAliasesDescriptor(Names name): base(r => r.Optional("name", name))
public CatAliasesDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary>
public CatAliasesDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
///<summary>Explicit operation timeout for connection to master node</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
public CatAliasesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Comma-separated list of column names or column aliases to sort by</summary>
public CatAliasesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns);
Expand Down Expand Up @@ -137,9 +138,11 @@ public CatCountDescriptor Index<TOther>()
public CatCountDescriptor Headers(params string[] headers) => Qs("h", headers);
///<summary>Return help information</summary>
public CatCountDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
public CatCountDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
///<summary>Explicit operation timeout for connection to master node</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
public CatCountDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Comma-separated list of column names or column aliases to sort by</summary>
public CatCountDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns);
Expand Down Expand Up @@ -177,9 +180,11 @@ public CatFielddataDescriptor(Fields fields): base(r => r.Optional("fields", fie
public CatFielddataDescriptor Headers(params string[] headers) => Qs("h", headers);
///<summary>Return help information</summary>
public CatFielddataDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
public CatFielddataDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
///<summary>Explicit operation timeout for connection to master node</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
public CatFielddataDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Comma-separated list of column names or column aliases to sort by</summary>
public CatFielddataDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns);
Expand All @@ -201,9 +206,11 @@ public partial class CatHealthDescriptor : RequestDescriptorBase<CatHealthDescri
public CatHealthDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>Set to false to disable timestamping</summary>
public CatHealthDescriptor IncludeTimestamp(bool? includetimestamp = true) => Qs("ts", includetimestamp);
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
public CatHealthDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
///<summary>Explicit operation timeout for connection to master node</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
public CatHealthDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Comma-separated list of column names or column aliases to sort by</summary>
public CatHealthDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns);
Expand Down Expand Up @@ -263,6 +270,7 @@ public CatIndicesDescriptor Index<TOther>()
///<summary>If set to true segment stats will include stats for segments that are not currently loaded into memory</summary>
public CatIndicesDescriptor IncludeUnloadedSegments(bool? includeunloadedsegments = true) => Qs("include_unloaded_segments", includeunloadedsegments);
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.11.0, reason: This parameter does not affect the request. It will be removed in a future release.")]
public CatIndicesDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary>
public CatIndicesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
Expand Down Expand Up @@ -352,7 +360,8 @@ public CatDatafeedsDescriptor(Id datafeedId): base(r => r.Optional("datafeed_id"
///<summary>The ID of the datafeeds stats to fetch</summary>
public CatDatafeedsDescriptor DatafeedId(Id datafeedId) => Assign(datafeedId, (a, v) => a.RouteValues.Optional("datafeed_id", v));
// Request parameters
///<summary>Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)</summary> [Obsolete("Scheduled to be removed in 7.0, deprecated")]
///<summary>Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)</summary>
[Obsolete("Scheduled to be removed in 8.0, deprecated")]
public CatDatafeedsDescriptor AllowNoDatafeeds(bool? allownodatafeeds = true) => Qs("allow_no_datafeeds", allownodatafeeds);
///<summary>Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)</summary>
public CatDatafeedsDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch);
Expand Down Expand Up @@ -388,7 +397,8 @@ public CatJobsDescriptor(Id jobId): base(r => r.Optional("job_id", jobId))
///<summary>The ID of the jobs stats to fetch</summary>
public CatJobsDescriptor JobId(Id jobId) => Assign(jobId, (a, v) => a.RouteValues.Optional("job_id", v));
// Request parameters
///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary> [Obsolete("Scheduled to be removed in 7.0, deprecated")]
///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary>
[Obsolete("Scheduled to be removed in 8.0, deprecated")]
public CatJobsDescriptor AllowNoJobs(bool? allownojobs = true) => Qs("allow_no_jobs", allownojobs);
///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary>
public CatJobsDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch);
Expand Down Expand Up @@ -484,7 +494,8 @@ public partial class CatNodesDescriptor : RequestDescriptorBase<CatNodesDescript
public CatNodesDescriptor Headers(params string[] headers) => Qs("h", headers);
///<summary>Return help information</summary>
public CatNodesDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>Calculate the selected nodes using the local cluster state rather than the state from master node (default: false)</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.6.0, reason: This parameter does not cause this API to act locally.")]
///<summary>Calculate the selected nodes using the local cluster state rather than the state from master node (default: false)</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.6.0, reason: This parameter does not cause this API to act locally.")]
public CatNodesDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary>
public CatNodesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
Expand Down Expand Up @@ -528,6 +539,8 @@ public partial class CatPluginsDescriptor : RequestDescriptorBase<CatPluginsDesc
public CatPluginsDescriptor Headers(params string[] headers) => Qs("h", headers);
///<summary>Return help information</summary>
public CatPluginsDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>Include bootstrap plugins in the response</summary>
public CatPluginsDescriptor IncludeBootstrap(bool? includebootstrap = true) => Qs("include_bootstrap", includebootstrap);
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary>
public CatPluginsDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary>
Expand Down Expand Up @@ -575,7 +588,8 @@ public CatRecoveryDescriptor Index<TOther>()
public CatRecoveryDescriptor Headers(params string[] headers) => Qs("h", headers);
///<summary>Return help information</summary>
public CatRecoveryDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>Explicit operation timeout for connection to master node</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
///<summary>Explicit operation timeout for connection to master node</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.5.0, reason: Removed from the server as it was never a valid option")]
public CatRecoveryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Comma-separated list of column names or column aliases to sort by</summary>
public CatRecoveryDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns);
Expand Down Expand Up @@ -678,6 +692,7 @@ public CatShardsDescriptor Index<TOther>()
///<summary>Return help information</summary>
public CatShardsDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.11.0, reason: This parameter does not affect the request. It will be removed in a future release.")]
public CatShardsDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary>
public CatShardsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
Expand Down Expand Up @@ -740,9 +755,9 @@ public partial class CatTasksDescriptor : RequestDescriptorBase<CatTasksDescript
///<summary>Return help information</summary>
public CatTasksDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>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</summary>
public CatTasksDescriptor NodeId(params string[] nodeid) => Qs("node_id", nodeid);
///<summary>Return tasks with specified parent task id. Set to -1 to return all.</summary>
public CatTasksDescriptor ParentTask(long? parenttask) => Qs("parent_task", parenttask);
public CatTasksDescriptor Nodes(params string[] nodes) => Qs("nodes", nodes);
///<summary>Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.</summary>
public CatTasksDescriptor ParentTaskId(string parenttaskid) => Qs("parent_task_id", parenttaskid);
///<summary>Comma-separated list of column names or column aliases to sort by</summary>
public CatTasksDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns);
///<summary>Verbose mode. Display column headers</summary>
Expand Down Expand Up @@ -815,7 +830,8 @@ public CatThreadPoolDescriptor(Names threadPoolPatterns): base(r => r.Optional("
public CatThreadPoolDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary>
public CatThreadPoolDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>The multiplier in which to display values</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.7.0, reason: Setting this value has no effect and will be removed from the specification.")]
///<summary>The multiplier in which to display values</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.7.0, reason: Setting this value has no effect and will be removed from the specification.")]
public CatThreadPoolDescriptor Size(Size? size) => Qs("size", size);
///<summary>Comma-separated list of column names or column aliases to sort by</summary>
public CatThreadPoolDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns);
Expand Down
17 changes: 12 additions & 5 deletions src/Nest/Descriptors.Indices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,9 @@ protected DeleteDataStreamDescriptor(): base()

// values part of the url path
Names IDeleteDataStreamRequest.Name => Self.RouteValues.Get<Names>("name");
// Request parameters
// Request parameters
///<summary>Whether wildcard expressions should get expanded to open or closed indices (default: open)</summary>
public DeleteDataStreamDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
}

///<summary>Descriptor for DeleteTemplate <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html</para></summary>
Expand Down Expand Up @@ -818,7 +820,9 @@ public GetDataStreamDescriptor(Names name): base(r => r.Optional("name", name))
Names IGetDataStreamRequest.Name => Self.RouteValues.Get<Names>("name");
///<summary>A comma-separated list of data streams to get; use `*` to get all data streams</summary>
public GetDataStreamDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v));
// Request parameters
// Request parameters
///<summary>Whether wildcard expressions should get expanded to open or closed indices (default: open)</summary>
public GetDataStreamDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
}

///<summary>Descriptor for GetFieldMapping <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html</para></summary>
Expand Down Expand Up @@ -902,7 +906,8 @@ public GetMappingDescriptor<TDocument> Index<TOther>()
public GetMappingDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Whether to add the type name to the response (default: false)</summary>
public GetMappingDescriptor<TDocument> IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename);
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.8.0, reason: This parameter is a no-op and field mappings are always retrieved locally.")]
///<summary>Return local information, do not retrieve the state from master node (default: false)</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.8.0, reason: This parameter is a no-op and field mappings are always retrieved locally.")]
public GetMappingDescriptor<TDocument> Local(bool? local = true) => Qs("local", local);
///<summary>Specify timeout for connection to master</summary>
public GetMappingDescriptor<TDocument> MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
Expand Down Expand Up @@ -1172,13 +1177,15 @@ protected PutIndexTemplateDescriptor(): base()
// Request parameters
///<summary>Whether the index template should only be added if new or can also replace an existing one</summary>
public PutIndexTemplateDescriptor Create(bool? create = true) => Qs("create", create);
///<summary>Return settings in flat format (default: false)</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.7.0, reason: Removed from the server as it was never a valid option")]
///<summary>Return settings in flat format (default: false)</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.7.0, reason: Removed from the server as it was never a valid option")]
public PutIndexTemplateDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
///<summary>Whether a type should be returned in the body of the mappings.</summary>
public PutIndexTemplateDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename);
///<summary>Specify timeout for connection to master</summary>
public PutIndexTemplateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Explicit operation timeout</summary> [Obsolete("Scheduled to be removed in 7.0, Deprecated as of: 7.7.0, reason: Removed from the server as it was never a valid option")]
///<summary>Explicit operation timeout</summary>
[Obsolete("Scheduled to be removed in 8.0, Deprecated as of: 7.7.0, reason: Removed from the server as it was never a valid option")]
public PutIndexTemplateDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}

Expand Down
Loading