Skip to content

Commit

Permalink
Re-generate cat.pending_tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Jan 9, 2024
1 parent c551535 commit bea149c
Show file tree
Hide file tree
Showing 13 changed files with 268 additions and 203 deletions.
1 change: 1 addition & 0 deletions src/ApiGenerator/Configuration/CodeConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public static class CodeConfiguration
new("cat.master"),
new("cat.nodeattrs"),
new("cat.nodes"),
new("cat.pending_tasks"),

new("cluster.*"),
new("dangling_indices.*"),
Expand Down
1 change: 0 additions & 1 deletion src/OpenSearch.Client/ApiUrlsLookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ namespace OpenSearch.Client
internal static partial class ApiUrlsLookups
{
internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[]{"_bulk", "{index}/_bulk"});
internal static ApiUrls CatPendingTasks = new ApiUrls(new[]{"_cat/pending_tasks"});
internal static ApiUrls CatPlugins = new ApiUrls(new[]{"_cat/plugins"});
internal static ApiUrls CatRecovery = new ApiUrls(new[]{"_cat/recovery", "_cat/recovery/{index}"});
internal static ApiUrls CatRepositories = new ApiUrls(new[]{"_cat/repositories"});
Expand Down
26 changes: 0 additions & 26 deletions src/OpenSearch.Client/Descriptors.Cat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,6 @@
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client
{
///<summary>Descriptor for PendingTasks <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</para></summary>
public partial class CatPendingTasksDescriptor : RequestDescriptorBase<CatPendingTasksDescriptor, CatPendingTasksRequestParameters, ICatPendingTasksRequest>, ICatPendingTasksRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.CatPendingTasks;
// values part of the url path
// Request parameters
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public CatPendingTasksDescriptor Format(string format) => Qs("format", format);
///<summary>Comma-separated list of column names to display</summary>
public CatPendingTasksDescriptor Headers(params string[] headers) => Qs("h", headers);
///<summary>Return help information</summary>
public CatPendingTasksDescriptor Help(bool? help = true) => Qs("help", help);
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public CatPendingTasksDescriptor Local(bool? local = true) => Qs("local", local);
///<summary>Explicit operation timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public CatPendingTasksDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Explicit operation timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public CatPendingTasksDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
///<summary>Comma-separated list of column names or column aliases to sort by</summary>
public CatPendingTasksDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns);
///<summary>Verbose mode. Display column headers</summary>
public CatPendingTasksDescriptor Verbose(bool? verbose = true) => Qs("v", verbose);
}

///<summary>Descriptor for Plugins <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-plugins/</para></summary>
public partial class CatPluginsDescriptor : RequestDescriptorBase<CatPluginsDescriptor, CatPluginsRequestParameters, ICatPluginsRequest>, ICatPluginsRequest
{
Expand Down
24 changes: 0 additions & 24 deletions src/OpenSearch.Client/OpenSearchClient.Cat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,6 @@ namespace OpenSearch.Client.Specification.CatApi
///</summary>
public partial class CatNamespace : NamespacedClientProxy
{
/// <summary>
/// <c>GET</c> request to the <c>cat.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/">https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</a>
/// </summary>
public CatResponse<CatPendingTasksRecord> PendingTasks(Func<CatPendingTasksDescriptor, ICatPendingTasksRequest> selector = null) => PendingTasks(selector.InvokeOrDefault(new CatPendingTasksDescriptor()));
/// <summary>
/// <c>GET</c> request to the <c>cat.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/">https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</a>
/// </summary>
public Task<CatResponse<CatPendingTasksRecord>> PendingTasksAsync(Func<CatPendingTasksDescriptor, ICatPendingTasksRequest> selector = null, CancellationToken ct = default) => PendingTasksAsync(selector.InvokeOrDefault(new CatPendingTasksDescriptor()), ct);
/// <summary>
/// <c>GET</c> request to the <c>cat.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/">https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</a>
/// </summary>
public CatResponse<CatPendingTasksRecord> PendingTasks(ICatPendingTasksRequest request) => DoCat<ICatPendingTasksRequest, CatPendingTasksRequestParameters, CatPendingTasksRecord>(request);
/// <summary>
/// <c>GET</c> request to the <c>cat.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href = "https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/">https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</a>
/// </summary>
public Task<CatResponse<CatPendingTasksRecord>> PendingTasksAsync(ICatPendingTasksRequest request, CancellationToken ct = default) => DoCatAsync<ICatPendingTasksRequest, CatPendingTasksRequestParameters, CatPendingTasksRecord>(request, ct);
/// <summary>
/// <c>GET</c> request to the <c>cat.plugins</c> API, read more about this API online:
/// <para></para>
Expand Down
75 changes: 0 additions & 75 deletions src/OpenSearch.Client/Requests.Cat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,81 +58,6 @@
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client
{
[InterfaceDataContract]
public partial interface ICatPendingTasksRequest : IRequest<CatPendingTasksRequestParameters>
{
}

///<summary>Request for PendingTasks <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</para></summary>
public partial class CatPendingTasksRequest : PlainRequestBase<CatPendingTasksRequestParameters>, ICatPendingTasksRequest
{
protected ICatPendingTasksRequest Self => this;
internal override ApiUrls ApiUrls => ApiUrlsLookups.CatPendingTasks;
// values part of the url path
// Request parameters
///<summary>a short version of the Accept header, e.g. json, yaml</summary>
public string Format
{
get => Q<string>("format");
set
{
Q("format", value);
SetAcceptHeader(value);
}
}

///<summary>Comma-separated list of column names to display</summary>
public string[] Headers
{
get => Q<string[]>("h");
set => Q("h", value);
}

///<summary>Return help information</summary>
public bool? Help
{
get => Q<bool? >("help");
set => Q("help", value);
}

///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public bool? Local
{
get => Q<bool? >("local");
set => Q("local", value);
}

///<summary>Explicit operation timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public Time MasterTimeout
{
get => Q<Time>("master_timeout");
set => Q("master_timeout", value);
}

///<summary>Explicit operation timeout for connection to cluster_manager node</summary>
///<remarks>Introduced in OpenSearch 2.0 instead of <see cref="MasterTimeout"/></remarks>
public Time ClusterManagerTimeout
{
get => Q<Time>("cluster_manager_timeout");
set => Q("cluster_manager_timeout", value);
}

///<summary>Comma-separated list of column names or column aliases to sort by</summary>
public string[] SortByColumns
{
get => Q<string[]>("s");
set => Q("s", value);
}

///<summary>Verbose mode. Display column headers</summary>
public bool? Verbose
{
get => Q<bool? >("v");
set => Q("v", value);
}
}

[InterfaceDataContract]
public partial interface ICatPluginsRequest : IRequest<CatPluginsRequestParameters>
{
Expand Down
2 changes: 2 additions & 0 deletions src/OpenSearch.Client/_Generated/ApiUrlsLookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ internal static partial class ApiUrlsLookups

internal static readonly ApiUrls CatNodes = new(new[] { "_cat/nodes" });

internal static readonly ApiUrls CatPendingTasks = new(new[] { "_cat/pending_tasks" });

internal static readonly ApiUrls ClusterAllocationExplain =
new(new[] { "_cluster/allocation/explain" });

Expand Down
45 changes: 45 additions & 0 deletions src/OpenSearch.Client/_Generated/Descriptors.Cat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -585,4 +585,49 @@ public CatNodesDescriptor SortByColumns(params string[] sortbycolumns) =>
/// <summary>Verbose mode. Display column headers.</summary>
public CatNodesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose);
}

/// <summary>Descriptor for PendingTasks <para>https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/</para></summary>
public partial class CatPendingTasksDescriptor
: RequestDescriptorBase<
CatPendingTasksDescriptor,
CatPendingTasksRequestParameters,
ICatPendingTasksRequest
>,
ICatPendingTasksRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.CatPendingTasks;

// values part of the url path
// Request parameters
/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <remarks>Supported by OpenSearch servers of version 2.0.0 or greater.</remarks>
public CatPendingTasksDescriptor ClusterManagerTimeout(Time clustermanagertimeout) =>
Qs("cluster_manager_timeout", clustermanagertimeout);

/// <summary>A short version of the Accept header, e.g. json, yaml.</summary>
public CatPendingTasksDescriptor Format(string format) => Qs("format", format);

/// <summary>Comma-separated list of column names to display.</summary>
public CatPendingTasksDescriptor Headers(params string[] headers) => Qs("h", headers);

/// <summary>Return help information.</summary>
public CatPendingTasksDescriptor Help(bool? help = true) => Qs("help", help);

/// <summary>Return local information, do not retrieve the state from cluster-manager node.</summary>
public CatPendingTasksDescriptor Local(bool? local = true) => Qs("local", local);

/// <summary>Operation timeout for connection to master node.</summary>
[Obsolete(
"Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
)]
public CatPendingTasksDescriptor MasterTimeout(Time mastertimeout) =>
Qs("master_timeout", mastertimeout);

/// <summary>Comma-separated list of column names or column aliases to sort by.</summary>
public CatPendingTasksDescriptor SortByColumns(params string[] sortbycolumns) =>
Qs("s", sortbycolumns);

/// <summary>Verbose mode. Display column headers.</summary>
public CatPendingTasksDescriptor Verbose(bool? verbose = true) => Qs("v", verbose);
}
}
44 changes: 44 additions & 0 deletions src/OpenSearch.Client/_Generated/OpenSearchClient.Cat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -526,5 +526,49 @@ public Task<CatResponse<CatNodesRecord>> NodesAsync(
ICatNodesRequest request,
CancellationToken ct = default
) => DoCatAsync<ICatNodesRequest, CatNodesRequestParameters, CatNodesRecord>(request, ct);

/// <summary>
/// <c>GET</c> request to the <c>cat.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/">https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/</a>
/// </summary>
public CatResponse<CatPendingTasksRecord> PendingTasks(
Func<CatPendingTasksDescriptor, ICatPendingTasksRequest> selector = null
) => PendingTasks(selector.InvokeOrDefault(new CatPendingTasksDescriptor()));

/// <summary>
/// <c>GET</c> request to the <c>cat.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/">https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/</a>
/// </summary>
public Task<CatResponse<CatPendingTasksRecord>> PendingTasksAsync(
Func<CatPendingTasksDescriptor, ICatPendingTasksRequest> selector = null,
CancellationToken ct = default
) => PendingTasksAsync(selector.InvokeOrDefault(new CatPendingTasksDescriptor()), ct);

/// <summary>
/// <c>GET</c> request to the <c>cat.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/">https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/</a>
/// </summary>
public CatResponse<CatPendingTasksRecord> PendingTasks(ICatPendingTasksRequest request) =>
DoCat<ICatPendingTasksRequest, CatPendingTasksRequestParameters, CatPendingTasksRecord>(
request
);

/// <summary>
/// <c>GET</c> request to the <c>cat.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/">https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/</a>
/// </summary>
public Task<CatResponse<CatPendingTasksRecord>> PendingTasksAsync(
ICatPendingTasksRequest request,
CancellationToken ct = default
) =>
DoCatAsync<
ICatPendingTasksRequest,
CatPendingTasksRequestParameters,
CatPendingTasksRecord
>(request, ct);
}
}
80 changes: 80 additions & 0 deletions src/OpenSearch.Client/_Generated/Requests.Cat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -940,4 +940,84 @@ public bool? Verbose
set => Q("v", value);
}
}

[InterfaceDataContract]
public partial interface ICatPendingTasksRequest
: IRequest<CatPendingTasksRequestParameters> { }

/// <summary>Request for PendingTasks <para>https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/</para></summary>
public partial class CatPendingTasksRequest
: PlainRequestBase<CatPendingTasksRequestParameters>,
ICatPendingTasksRequest
{
protected ICatPendingTasksRequest Self => this;
internal override ApiUrls ApiUrls => ApiUrlsLookups.CatPendingTasks;

// values part of the url path

// Request parameters
/// <summary>Operation timeout for connection to cluster-manager node.</summary>
/// <remarks>Supported by OpenSearch servers of version 2.0.0 or greater.</remarks>
public Time ClusterManagerTimeout
{
get => Q<Time>("cluster_manager_timeout");
set => Q("cluster_manager_timeout", value);
}

/// <summary>A short version of the Accept header, e.g. json, yaml.</summary>
public string Format
{
get => Q<string>("format");
set
{
Q("format", value);
SetAcceptHeader(value);
}
}

/// <summary>Comma-separated list of column names to display.</summary>
public string[] Headers
{
get => Q<string[]>("h");
set => Q("h", value);
}

/// <summary>Return help information.</summary>
public bool? Help
{
get => Q<bool?>("help");
set => Q("help", value);
}

/// <summary>Return local information, do not retrieve the state from cluster-manager node.</summary>
public bool? Local
{
get => Q<bool?>("local");
set => Q("local", value);
}

/// <summary>Operation timeout for connection to master node.</summary>
[Obsolete(
"Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
)]
public Time MasterTimeout
{
get => Q<Time>("master_timeout");
set => Q("master_timeout", value);
}

/// <summary>Comma-separated list of column names or column aliases to sort by.</summary>
public string[] SortByColumns
{
get => Q<string[]>("s");
set => Q("s", value);
}

/// <summary>Verbose mode. Display column headers.</summary>
public bool? Verbose
{
get => Q<bool?>("v");
set => Q("v", value);
}
}
}
Loading

0 comments on commit bea149c

Please sign in to comment.