Skip to content

Commit

Permalink
Re-generate cluster.pending_tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
  • Loading branch information
Xtansia committed Sep 7, 2023
1 parent a1f1174 commit 7a24622
Show file tree
Hide file tree
Showing 13 changed files with 181 additions and 115 deletions.
1 change: 1 addition & 0 deletions src/ApiGenerator/Configuration/CodeConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public static class CodeConfiguration
new("cluster.get_component_template"),
new("cluster.get_settings"),
new("cluster.health"),
new("cluster.pending_tasks"),

new("dangling_indices.*"),
new("ingest.*"),
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 @@ -70,7 +70,6 @@ internal static partial class ApiUrlsLookups
internal static ApiUrls CatTemplates = new ApiUrls(new[]{"_cat/templates", "_cat/templates/{name}"});
internal static ApiUrls CatThreadPool = new ApiUrls(new[]{"_cat/thread_pool", "_cat/thread_pool/{thread_pool_patterns}"});
internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[]{"_search/scroll"});
internal static ApiUrls ClusterPendingTasks = new ApiUrls(new[]{"_cluster/pending_tasks"});
internal static ApiUrls ClusterPostVotingConfigExclusions = new ApiUrls(new[]{"_cluster/voting_config_exclusions"});
internal static ApiUrls ClusterPutSettings = new ApiUrls(new[]{"_cluster/settings"});
internal static ApiUrls ClusterRemoteInfo = new ApiUrls(new[]{"_remote/info"});
Expand Down
16 changes: 0 additions & 16 deletions src/OpenSearch.Client/Descriptors.Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,6 @@
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client.Specification.ClusterApi
{
///<summary>Descriptor for PendingTasks <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</para></summary>
public partial class ClusterPendingTasksDescriptor : RequestDescriptorBase<ClusterPendingTasksDescriptor, ClusterPendingTasksRequestParameters, IClusterPendingTasksRequest>, IClusterPendingTasksRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks;
// values part of the url path
// Request parameters
///<summary>Return local information, do not retrieve the state from cluster_manager node (default: false)</summary>
public ClusterPendingTasksDescriptor 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 ClusterPendingTasksDescriptor 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 ClusterPendingTasksDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
}

///<summary>Descriptor for PostVotingConfigExclusions <para></para></summary>
public partial class PostVotingConfigExclusionsDescriptor : RequestDescriptorBase<PostVotingConfigExclusionsDescriptor, PostVotingConfigExclusionsRequestParameters, IPostVotingConfigExclusionsRequest>, IPostVotingConfigExclusionsRequest
{
Expand Down
24 changes: 0 additions & 24 deletions src/OpenSearch.Client/OpenSearchClient.Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,6 @@ namespace OpenSearch.Client.Specification.ClusterApi
///</summary>
public partial class ClusterNamespace : NamespacedClientProxy
{
/// <summary>
/// <c>GET</c> request to the <c>cluster.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 ClusterPendingTasksResponse PendingTasks(Func<ClusterPendingTasksDescriptor, IClusterPendingTasksRequest> selector = null) => PendingTasks(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()));
/// <summary>
/// <c>GET</c> request to the <c>cluster.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<ClusterPendingTasksResponse> PendingTasksAsync(Func<ClusterPendingTasksDescriptor, IClusterPendingTasksRequest> selector = null, CancellationToken ct = default) => PendingTasksAsync(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()), ct);
/// <summary>
/// <c>GET</c> request to the <c>cluster.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 ClusterPendingTasksResponse PendingTasks(IClusterPendingTasksRequest request) => DoRequest<IClusterPendingTasksRequest, ClusterPendingTasksResponse>(request, request.RequestParameters);
/// <summary>
/// <c>GET</c> request to the <c>cluster.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<ClusterPendingTasksResponse> PendingTasksAsync(IClusterPendingTasksRequest request, CancellationToken ct = default) => DoRequestAsync<IClusterPendingTasksRequest, ClusterPendingTasksResponse>(request, request.RequestParameters, ct);
/// <summary>
/// <c>POST</c> request to the <c>cluster.post_voting_config_exclusions</c> API, read more about this API online:
/// <para></para>
Expand Down
36 changes: 0 additions & 36 deletions src/OpenSearch.Client/Requests.Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,42 +58,6 @@
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client.Specification.ClusterApi
{
[InterfaceDataContract]
public partial interface IClusterPendingTasksRequest : IRequest<ClusterPendingTasksRequestParameters>
{
}

///<summary>Request for PendingTasks <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</para></summary>
public partial class ClusterPendingTasksRequest : PlainRequestBase<ClusterPendingTasksRequestParameters>, IClusterPendingTasksRequest
{
protected IClusterPendingTasksRequest Self => this;
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks;
// values part of the url path
// Request parameters
///<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>Specify 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>Specify 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);
}
}

[InterfaceDataContract]
public partial interface IPostVotingConfigExclusionsRequest : IRequest<PostVotingConfigExclusionsRequestParameters>
{
Expand Down
3 changes: 3 additions & 0 deletions src/OpenSearch.Client/_Generated/ApiUrlsLookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ internal static partial class ApiUrlsLookups
internal static readonly ApiUrls ClusterHealth =
new(new[] { "_cluster/health", "_cluster/health/{index}" });

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

internal static readonly ApiUrls DanglingIndicesDeleteDanglingIndex =
new(new[] { "_dangling/{index_uuid}" });

Expand Down
29 changes: 29 additions & 0 deletions src/OpenSearch.Client/_Generated/Descriptors.Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,33 @@ public ClusterHealthDescriptor WaitForNoRelocatingShards(
public ClusterHealthDescriptor WaitForStatus(WaitForStatus? waitforstatus) =>
Qs("wait_for_status", waitforstatus);
}

///<summary>Descriptor for PendingTasks <para>https://opensearch.org/docs/latest</para></summary>
public partial class ClusterPendingTasksDescriptor
: RequestDescriptorBase<
ClusterPendingTasksDescriptor,
ClusterPendingTasksRequestParameters,
IClusterPendingTasksRequest
>,
IClusterPendingTasksRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks;

// 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 ClusterPendingTasksDescriptor ClusterManagerTimeout(Time clustermanagertimeout) =>
Qs("cluster_manager_timeout", clustermanagertimeout);

///<summary>Return local information, do not retrieve the state from cluster-manager node.</summary>
public ClusterPendingTasksDescriptor 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 ClusterPendingTasksDescriptor MasterTimeout(Time mastertimeout) =>
Qs("master_timeout", mastertimeout);
}
}
45 changes: 45 additions & 0 deletions src/OpenSearch.Client/_Generated/OpenSearchClient.Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,5 +269,50 @@ public Task<ClusterHealthResponse> HealthAsync(
request.RequestParameters,
ct
);

/// <summary>
/// <c>GET</c> request to the <c>cluster.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest">https://opensearch.org/docs/latest</a>
/// </summary>
public ClusterPendingTasksResponse PendingTasks(
Func<ClusterPendingTasksDescriptor, IClusterPendingTasksRequest> selector = null
) => PendingTasks(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()));

/// <summary>
/// <c>GET</c> request to the <c>cluster.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest">https://opensearch.org/docs/latest</a>
/// </summary>
public Task<ClusterPendingTasksResponse> PendingTasksAsync(
Func<ClusterPendingTasksDescriptor, IClusterPendingTasksRequest> selector = null,
CancellationToken ct = default
) => PendingTasksAsync(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()), ct);

/// <summary>
/// <c>GET</c> request to the <c>cluster.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest">https://opensearch.org/docs/latest</a>
/// </summary>
public ClusterPendingTasksResponse PendingTasks(IClusterPendingTasksRequest request) =>
DoRequest<IClusterPendingTasksRequest, ClusterPendingTasksResponse>(
request,
request.RequestParameters
);

/// <summary>
/// <c>GET</c> request to the <c>cluster.pending_tasks</c> API, read more about this API online:
/// <para></para>
/// <a href="https://opensearch.org/docs/latest">https://opensearch.org/docs/latest</a>
/// </summary>
public Task<ClusterPendingTasksResponse> PendingTasksAsync(
IClusterPendingTasksRequest request,
CancellationToken ct = default
) =>
DoRequestAsync<IClusterPendingTasksRequest, ClusterPendingTasksResponse>(
request,
request.RequestParameters,
ct
);
}
}
41 changes: 41 additions & 0 deletions src/OpenSearch.Client/_Generated/Requests.Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,45 @@ public WaitForStatus? WaitForStatus
set => Q("wait_for_status", value);
}
}

[InterfaceDataContract]
public partial interface IClusterPendingTasksRequest
: IRequest<ClusterPendingTasksRequestParameters> { }

///<summary>Request for PendingTasks <para>https://opensearch.org/docs/latest</para></summary>
public partial class ClusterPendingTasksRequest
: PlainRequestBase<ClusterPendingTasksRequestParameters>,
IClusterPendingTasksRequest
{
protected IClusterPendingTasksRequest Self => this;
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks;

// 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>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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,6 @@
// ReSharper disable once CheckNamespace
namespace OpenSearch.Net.Specification.ClusterApi
{
///<summary>Request options for PendingTasks <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</para></summary>
public class ClusterPendingTasksRequestParameters : RequestParameters<ClusterPendingTasksRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<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>Specify timeout for connection to master node</summary>
///<remarks>Deprecated as of OpenSearch 2.0, use <see cref="ClusterManagerTimeout"/> instead</remarks>
public TimeSpan MasterTimeout
{
get => Q<TimeSpan>("master_timeout");
set => Q("master_timeout", value);
}

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

///<summary>Request options for PostVotingConfigExclusions <para></para></summary>
public class PostVotingConfigExclusionsRequestParameters : RequestParameters<PostVotingConfigExclusionsRequestParameters>
{
Expand Down
9 changes: 0 additions & 9 deletions src/OpenSearch.Net/OpenSearchLowLevelClient.Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ namespace OpenSearch.Net.Specification.ClusterApi
///</summary>
public partial class LowLevelClusterNamespace : NamespacedClientProxy
{
///<summary>GET on /_cluster/pending_tasks <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
public TResponse PendingTasks<TResponse>(ClusterPendingTasksRequestParameters requestParameters = null)
where TResponse : class, IOpenSearchResponse, new() => DoRequest<TResponse>(GET, "_cluster/pending_tasks", null, RequestParams(requestParameters));
///<summary>GET on /_cluster/pending_tasks <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
[MapsApi("cluster.pending_tasks", "")]
public Task<TResponse> PendingTasksAsync<TResponse>(ClusterPendingTasksRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync<TResponse>(GET, "_cluster/pending_tasks", ctx, null, RequestParams(requestParameters));
///<summary>POST on /_cluster/voting_config_exclusions <para></para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
public TResponse PostVotingConfigExclusions<TResponse>(PostVotingConfigExclusionsRequestParameters requestParameters = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,4 +336,37 @@ public WaitForStatus? WaitForStatus
set => Q("wait_for_status", value);
}
}

///<summary>Request options for PendingTasks <para>https://opensearch.org/docs/latest</para></summary>
public partial class ClusterPendingTasksRequestParameters
: RequestParameters<ClusterPendingTasksRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;

///<summary>Operation timeout for connection to cluster-manager node.</summary>
///<remarks>Supported by OpenSearch servers of version 2.0.0 or greater.</remarks>
public TimeSpan ClusterManagerTimeout
{
get => Q<TimeSpan>("cluster_manager_timeout");
set => Q("cluster_manager_timeout", 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 TimeSpan MasterTimeout
{
get => Q<TimeSpan>("master_timeout");
set => Q("master_timeout", value);
}
}
}
29 changes: 29 additions & 0 deletions src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -337,5 +337,34 @@ public Task<TResponse> HealthAsync<TResponse>(
null,
RequestParams(requestParameters)
);

///<summary>GET on /_cluster/pending_tasks <para>https://opensearch.org/docs/latest</para></summary>
///<param name="requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
public TResponse PendingTasks<TResponse>(
ClusterPendingTasksRequestParameters requestParameters = null
)
where TResponse : class, IOpenSearchResponse, new() =>
DoRequest<TResponse>(
GET,
"_cluster/pending_tasks",
null,
RequestParams(requestParameters)
);

///<summary>GET on /_cluster/pending_tasks <para>https://opensearch.org/docs/latest</para></summary>
///<param name="requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
[MapsApi("cluster.pending_tasks", "")]
public Task<TResponse> PendingTasksAsync<TResponse>(
ClusterPendingTasksRequestParameters requestParameters = null,
CancellationToken ctx = default
)
where TResponse : class, IOpenSearchResponse, new() =>
DoRequestAsync<TResponse>(
GET,
"_cluster/pending_tasks",
ctx,
null,
RequestParams(requestParameters)
);
}
}

0 comments on commit 7a24622

Please sign in to comment.