From 7023da60005b34d511db850d155fab9f481bfa61 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Wed, 10 Jan 2024 04:53:06 +1300 Subject: [PATCH] Re-generate cat API namespace (part 1) (#505) * Re-generate `cat.aliases` Signed-off-by: Thomas Farr * Re-generate `cat.allocation` Signed-off-by: Thomas Farr * Re-generate `cat.count` Signed-off-by: Thomas Farr * Re-generate `cat.fielddata` Signed-off-by: Thomas Farr * Re-generate `cat.health` Signed-off-by: Thomas Farr * Re-generate `cat.help` Signed-off-by: Thomas Farr * Re-generate `cat.indices` Signed-off-by: Thomas Farr * Re-generate `cat.master` Signed-off-by: Thomas Farr * Improve formatting Signed-off-by: Thomas Farr * Re-generate `cat.cluster_manager` Signed-off-by: Thomas Farr * Re-generate `cat.nodeattrs` Signed-off-by: Thomas Farr * Re-generate `cat.nodes` Signed-off-by: Thomas Farr * Re-generate `cat.pending_tasks` Signed-off-by: Thomas Farr --------- Signed-off-by: Thomas Farr --- .../Configuration/CodeConfiguration.cs | 13 + src/ApiGenerator/OpenSearch.openapi.json | 4 +- src/OpenSearch.Client/ApiUrlsLookup.cs | 14 - src/OpenSearch.Client/Descriptors.Cat.cs | 364 ------ .../IOpenSearchClient.Generated.cs | 6 - src/OpenSearch.Client/OpenSearchClient.Cat.cs | 302 +---- .../OpenSearchClient.NoNamespace.cs | 9 - src/OpenSearch.Client/Requests.Cat.cs | 911 --------------- .../_Generated/ApiUrlsLookup.cs | 29 + .../_Generated/Descriptors.Cat.cs | 633 ++++++++++ .../_Generated/IOpenSearchClient.cs | 4 + .../_Generated/OpenSearchClient.Cat.cs | 574 +++++++++ .../_Generated/OpenSearchClient.cs | 5 + .../_Generated/Requests.Cat.cs | 1023 +++++++++++++++++ src/OpenSearch.Client/_Generated/Requests.cs | 1 + src/OpenSearch.Net/Api/Enums.cs | 86 -- .../RequestParameters.Cat.cs | 753 ------------ .../IOpenSearchLowLevelClient.Generated.cs | 6 - .../OpenSearchLowLevelClient.Cat.cs | 185 +-- .../OpenSearchLowLevelClient.NoNamespace.cs | 8 - src/OpenSearch.Net/_Generated/Api/Enums.cs | 100 ++ .../RequestParameters.Cat.cs | 857 ++++++++++++++ .../_Generated/IOpenSearchLowLevelClient.cs | 4 + .../OpenSearchLowLevelClient.Cat.cs | 520 +++++++++ .../_Generated/OpenSearchLowLevelClient.cs | 3 + tests/Tests.Reproduce/GithubIssue4243.cs | 2 + .../Tests/Cat/CatMaster/CatMasterApiTests.cs | 1 + .../Tests/Cat/CatMaster/CatMasterUrlTests.cs | 1 + 28 files changed, 3777 insertions(+), 2641 deletions(-) create mode 100644 src/OpenSearch.Client/_Generated/Descriptors.Cat.cs create mode 100644 src/OpenSearch.Client/_Generated/OpenSearchClient.Cat.cs create mode 100644 src/OpenSearch.Client/_Generated/Requests.Cat.cs create mode 100644 src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cat.cs create mode 100644 src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cat.cs diff --git a/src/ApiGenerator/Configuration/CodeConfiguration.cs b/src/ApiGenerator/Configuration/CodeConfiguration.cs index b09c34bb95..7be3540059 100644 --- a/src/ApiGenerator/Configuration/CodeConfiguration.cs +++ b/src/ApiGenerator/Configuration/CodeConfiguration.cs @@ -41,6 +41,19 @@ public static class CodeConfiguration { new("{create,delete}_pit"), new("{delete,get}_all_pits"), + + new("cat.aliases"), + new("cat.allocation"), + new("cat.cluster_manager"), + new("cat.count"), + new("cat.fielddata"), + new("cat.health"), + new("cat.help"), + new("cat.indices"), + new("cat.master"), + new("cat.nodeattrs"), + new("cat.nodes"), + new("cat.pending_tasks"), new("cluster.*"), new("dangling_indices.*"), diff --git a/src/ApiGenerator/OpenSearch.openapi.json b/src/ApiGenerator/OpenSearch.openapi.json index fe1126c5e3..924d029be3 100644 --- a/src/ApiGenerator/OpenSearch.openapi.json +++ b/src/ApiGenerator/OpenSearch.openapi.json @@ -1323,7 +1323,7 @@ } }, "x-operation-group": "cat.cluster_manager", - "x-version-added": "1.0" + "x-version-added": "2.0" } }, "/_cat/count": { @@ -2239,7 +2239,7 @@ "x-deprecation-message": "To promote inclusive language, please use '/_cat/cluster_manager' instead.", "x-operation-group": "cat.master", "x-version-added": "1.0", - "x-version-deprecated": "1.0" + "x-version-deprecated": "2.0" } }, "/_cat/nodeattrs": { diff --git a/src/OpenSearch.Client/ApiUrlsLookup.cs b/src/OpenSearch.Client/ApiUrlsLookup.cs index 1d8ba9ee50..dba4eda9d9 100644 --- a/src/OpenSearch.Client/ApiUrlsLookup.cs +++ b/src/OpenSearch.Client/ApiUrlsLookup.cs @@ -46,20 +46,6 @@ namespace OpenSearch.Client internal static partial class ApiUrlsLookups { internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[]{"_bulk", "{index}/_bulk"}); - internal static ApiUrls CatAliases = new ApiUrls(new[]{"_cat/aliases", "_cat/aliases/{name}"}); - internal static ApiUrls CatAllocation = new ApiUrls(new[]{"_cat/allocation", "_cat/allocation/{node_id}"}); - internal static ApiUrls CatCount = new ApiUrls(new[]{"_cat/count", "_cat/count/{index}"}); - ///Introduced in OpenSearch 2.0 instead of - internal static ApiUrls CatClusterManager = new ApiUrls(new[]{"_cat/cluster_manager"}); - internal static ApiUrls CatFielddata = new ApiUrls(new[]{"_cat/fielddata", "_cat/fielddata/{fields}"}); - internal static ApiUrls CatHealth = new ApiUrls(new[]{"_cat/health"}); - internal static ApiUrls CatHelp = new ApiUrls(new[]{"_cat"}); - internal static ApiUrls CatIndices = new ApiUrls(new[]{"_cat/indices", "_cat/indices/{index}"}); - ///Deprecated as of OpenSearch 2.0, use instead - internal static ApiUrls CatMaster = new ApiUrls(new[]{"_cat/master"}); - internal static ApiUrls CatNodeAttributes = new ApiUrls(new[]{"_cat/nodeattrs"}); - internal static ApiUrls CatNodes = new ApiUrls(new[]{"_cat/nodes"}); - 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"}); diff --git a/src/OpenSearch.Client/Descriptors.Cat.cs b/src/OpenSearch.Client/Descriptors.Cat.cs index f2d3ed6224..94a072c8b9 100644 --- a/src/OpenSearch.Client/Descriptors.Cat.cs +++ b/src/OpenSearch.Client/Descriptors.Cat.cs @@ -57,370 +57,6 @@ // ReSharper disable RedundantNameQualifier namespace OpenSearch.Client { - ///Descriptor for Aliases https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-aliases/ - public partial class CatAliasesDescriptor : RequestDescriptorBase, ICatAliasesRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatAliases; - ////_cat/aliases - public CatAliasesDescriptor(): base() - { - } - - ////_cat/aliases/{name} - ///Optional, accepts null - public CatAliasesDescriptor(Names name): base(r => r.Optional("name", name)) - { - } - - // values part of the url path - Names ICatAliasesRequest.Name => Self.RouteValues.Get("name"); - ///A comma-separated list of alias names to return - public CatAliasesDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); - // Request parameters - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. - public CatAliasesDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///a short version of the Accept header, e.g. json, yaml - public CatAliasesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatAliasesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatAliasesDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatAliasesDescriptor Local(bool? local = true) => Qs("local", local); - ///Comma-separated list of column names or column aliases to sort by - public CatAliasesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatAliasesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Allocation https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-allocation/ - public partial class CatAllocationDescriptor : RequestDescriptorBase, ICatAllocationRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatAllocation; - ////_cat/allocation - public CatAllocationDescriptor(): base() - { - } - - ////_cat/allocation/{node_id} - ///Optional, accepts null - public CatAllocationDescriptor(NodeIds nodeId): base(r => r.Optional("node_id", nodeId)) - { - } - - // values part of the url path - NodeIds ICatAllocationRequest.NodeId => Self.RouteValues.Get("node_id"); - ///A comma-separated list of node IDs or names to limit the returned information - public CatAllocationDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v)); - // Request parameters - ///The unit in which to display byte values - public CatAllocationDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///a short version of the Accept header, e.g. json, yaml - public CatAllocationDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatAllocationDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatAllocationDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatAllocationDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatAllocationDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatAllocationDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Comma-separated list of column names or column aliases to sort by - public CatAllocationDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatAllocationDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Count https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-count/ - public partial class CatCountDescriptor : RequestDescriptorBase, ICatCountRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatCount; - ////_cat/count - public CatCountDescriptor(): base() - { - } - - ////_cat/count/{index} - ///Optional, accepts null - public CatCountDescriptor(Indices index): base(r => r.Optional("index", index)) - { - } - - // values part of the url path - Indices ICatCountRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to limit the returned information - public CatCountDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) - public CatCountDescriptor Index() - where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) - public CatCountDescriptor AllIndices() => Index(Indices.All); - // Request parameters - ///a short version of the Accept header, e.g. json, yaml - public CatCountDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatCountDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatCountDescriptor Help(bool? help = true) => Qs("help", help); - ///Comma-separated list of column names or column aliases to sort by - public CatCountDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatCountDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Fielddata https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-field-data/ - public partial class CatFielddataDescriptor : RequestDescriptorBase, ICatFielddataRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatFielddata; - ////_cat/fielddata - public CatFielddataDescriptor(): base() - { - } - - ////_cat/fielddata/{fields} - ///Optional, accepts null - public CatFielddataDescriptor(Fields fields): base(r => r.Optional("fields", fields)) - { - } - - // values part of the url path - Fields ICatFielddataRequest.Fields => Self.RouteValues.Get("fields"); - ///A comma-separated list of fields to return the fielddata size - public CatFielddataDescriptor Fields(Fields fields) => Assign(fields, (a, v) => a.RouteValues.Optional("fields", v)); - ///A comma-separated list of fields to return the fielddata size - public CatFielddataDescriptor Fields(params Expression>[] fields) => Assign(fields, (a, v) => a.RouteValues.Optional("fields", (Fields)v)); - // Request parameters - ///The unit in which to display byte values - public CatFielddataDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///a short version of the Accept header, e.g. json, yaml - public CatFielddataDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatFielddataDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatFielddataDescriptor Help(bool? help = true) => Qs("help", help); - ///Comma-separated list of column names or column aliases to sort by - public CatFielddataDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatFielddataDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Health https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-health/ - public partial class CatHealthDescriptor : RequestDescriptorBase, ICatHealthRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatHealth; - // values part of the url path - // Request parameters - ///a short version of the Accept header, e.g. json, yaml - public CatHealthDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatHealthDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatHealthDescriptor Help(bool? help = true) => Qs("help", help); - ///Set to false to disable timestamping - public CatHealthDescriptor IncludeTimestamp(bool? includetimestamp = true) => Qs("ts", includetimestamp); - ///Comma-separated list of column names or column aliases to sort by - public CatHealthDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatHealthDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Help https://opensearch.org/docs/latest/opensearch/rest-api/cat/index/ - public partial class CatHelpDescriptor : RequestDescriptorBase, ICatHelpRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatHelp; - // values part of the url path - // Request parameters - ///Return help information - public CatHelpDescriptor Help(bool? help = true) => Qs("help", help); - ///Comma-separated list of column names or column aliases to sort by - public CatHelpDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - } - - ///Descriptor for Indices https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-indices/ - public partial class CatIndicesDescriptor : RequestDescriptorBase, ICatIndicesRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatIndices; - ////_cat/indices - public CatIndicesDescriptor(): base() - { - } - - ////_cat/indices/{index} - ///Optional, accepts null - public CatIndicesDescriptor(Indices index): base(r => r.Optional("index", index)) - { - } - - // values part of the url path - Indices ICatIndicesRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to limit the returned information - public CatIndicesDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) - public CatIndicesDescriptor Index() - where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) - public CatIndicesDescriptor AllIndices() => Index(Indices.All); - // Request parameters - ///The unit in which to display byte values - public CatIndicesDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. - public CatIndicesDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///a short version of the Accept header, e.g. json, yaml - public CatIndicesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatIndicesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///A health status ("green", "yellow", or "red" to filter only indices matching the specified health status - public CatIndicesDescriptor Health(Health? health) => Qs("health", health); - ///Return help information - public CatIndicesDescriptor Help(bool? help = true) => Qs("help", help); - ///If set to true segment stats will include stats for segments that are not currently loaded into memory - public CatIndicesDescriptor IncludeUnloadedSegments(bool? includeunloadedsegments = true) => Qs("include_unloaded_segments", includeunloadedsegments); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatIndicesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatIndicesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatIndicesDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Set to true to return stats only for primary shards - public CatIndicesDescriptor Pri(bool? pri = true) => Qs("pri", pri); - ///Comma-separated list of column names or column aliases to sort by - public CatIndicesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatIndicesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Master https://opensearch.org/docs/1.2/opensearch/rest-api/cat/cat-master/ - ///Deprecated as of OpenSearch 2.0, use instead - public partial class CatMasterDescriptor : RequestDescriptorBase, ICatMasterRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatMaster; - // values part of the url path - // Request parameters - ///a short version of the Accept header, e.g. json, yaml - public CatMasterDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatMasterDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatMasterDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatMasterDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - public CatMasterDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by - public CatMasterDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatMasterDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Master https://opensearch.org/docs/1.2/opensearch/rest-api/cat/cat-master/ - ///Introduced in OpenSearch 2.0 instead of - public partial class CatClusterManagerDescriptor : RequestDescriptorBase, ICatClusterManagerRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatClusterManager; - // values part of the url path - // Request parameters - ///a short version of the Accept header, e.g. json, yaml - public CatClusterManagerDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatClusterManagerDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatClusterManagerDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatClusterManagerDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to cluster_manager node - public CatClusterManagerDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Comma-separated list of column names or column aliases to sort by - public CatClusterManagerDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatClusterManagerDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for NodeAttributes https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodeattrs/ - public partial class CatNodeAttributesDescriptor : RequestDescriptorBase, ICatNodeAttributesRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatNodeAttributes; - // values part of the url path - // Request parameters - ///a short version of the Accept header, e.g. json, yaml - public CatNodeAttributesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatNodeAttributesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatNodeAttributesDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatNodeAttributesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatNodeAttributesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatNodeAttributesDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Comma-separated list of column names or column aliases to sort by - public CatNodeAttributesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatNodeAttributesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Nodes https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/ - public partial class CatNodesDescriptor : RequestDescriptorBase, ICatNodesRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatNodes; - // values part of the url path - // Request parameters - ///The unit in which to display byte values - public CatNodesDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///a short version of the Accept header, e.g. json, yaml - public CatNodesDescriptor Format(string format) => Qs("format", format); - ///Return the full node ID instead of the shortened version (default: false) - public CatNodesDescriptor FullId(bool? fullid = true) => Qs("full_id", fullid); - ///Comma-separated list of column names to display - public CatNodesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatNodesDescriptor Help(bool? help = true) => Qs("help", help); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatNodesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatNodesDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Comma-separated list of column names or column aliases to sort by - public CatNodesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatNodesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for PendingTasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/ - public partial class CatPendingTasksDescriptor : RequestDescriptorBase, ICatPendingTasksRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatPendingTasks; - // values part of the url path - // Request parameters - ///a short version of the Accept header, e.g. json, yaml - public CatPendingTasksDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatPendingTasksDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatPendingTasksDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatPendingTasksDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatPendingTasksDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatPendingTasksDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///Comma-separated list of column names or column aliases to sort by - public CatPendingTasksDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers - public CatPendingTasksDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - ///Descriptor for Plugins https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-plugins/ public partial class CatPluginsDescriptor : RequestDescriptorBase, ICatPluginsRequest { diff --git a/src/OpenSearch.Client/IOpenSearchClient.Generated.cs b/src/OpenSearch.Client/IOpenSearchClient.Generated.cs index c582459651..1d895c73e6 100644 --- a/src/OpenSearch.Client/IOpenSearchClient.Generated.cs +++ b/src/OpenSearch.Client/IOpenSearchClient.Generated.cs @@ -64,12 +64,6 @@ namespace OpenSearch.Client /// public partial interface IOpenSearchClient { - ///Cat APIs - CatNamespace Cat - { - get; - } - /// /// POST request to the bulk API, read more about this API online: /// diff --git a/src/OpenSearch.Client/OpenSearchClient.Cat.cs b/src/OpenSearch.Client/OpenSearchClient.Cat.cs index ebf3fa065d..e34740a232 100644 --- a/src/OpenSearch.Client/OpenSearchClient.Cat.cs +++ b/src/OpenSearch.Client/OpenSearchClient.Cat.cs @@ -57,308 +57,8 @@ namespace OpenSearch.Client.Specification.CatApi /// on . /// /// - public class CatNamespace : NamespacedClientProxy + public partial class CatNamespace : NamespacedClientProxy { - internal CatNamespace(OpenSearchClient client): base(client) - { - } - - /// - /// GET request to the cat.aliases API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-aliases/ - /// - public CatResponse Aliases(Func selector = null) => Aliases(selector.InvokeOrDefault(new CatAliasesDescriptor())); - /// - /// GET request to the cat.aliases API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-aliases/ - /// - public Task> AliasesAsync(Func selector = null, CancellationToken ct = default) => AliasesAsync(selector.InvokeOrDefault(new CatAliasesDescriptor()), ct); - /// - /// GET request to the cat.aliases API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-aliases/ - /// - public CatResponse Aliases(ICatAliasesRequest request) => DoCat(request); - /// - /// GET request to the cat.aliases API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-aliases/ - /// - public Task> AliasesAsync(ICatAliasesRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.allocation API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-allocation/ - /// - public CatResponse Allocation(Func selector = null) => Allocation(selector.InvokeOrDefault(new CatAllocationDescriptor())); - /// - /// GET request to the cat.allocation API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-allocation/ - /// - public Task> AllocationAsync(Func selector = null, CancellationToken ct = default) => AllocationAsync(selector.InvokeOrDefault(new CatAllocationDescriptor()), ct); - /// - /// GET request to the cat.allocation API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-allocation/ - /// - public CatResponse Allocation(ICatAllocationRequest request) => DoCat(request); - /// - /// GET request to the cat.allocation API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-allocation/ - /// - public Task> AllocationAsync(ICatAllocationRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.count API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-count/ - /// - public CatResponse Count(Func selector = null) => Count(selector.InvokeOrDefault(new CatCountDescriptor())); - /// - /// GET request to the cat.count API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-count/ - /// - public Task> CountAsync(Func selector = null, CancellationToken ct = default) => CountAsync(selector.InvokeOrDefault(new CatCountDescriptor()), ct); - /// - /// GET request to the cat.count API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-count/ - /// - public CatResponse Count(ICatCountRequest request) => DoCat(request); - /// - /// GET request to the cat.count API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-count/ - /// - public Task> CountAsync(ICatCountRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.fielddata API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-field-data/ - /// - public CatResponse Fielddata(Func selector = null) => Fielddata(selector.InvokeOrDefault(new CatFielddataDescriptor())); - /// - /// GET request to the cat.fielddata API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-field-data/ - /// - public Task> FielddataAsync(Func selector = null, CancellationToken ct = default) => FielddataAsync(selector.InvokeOrDefault(new CatFielddataDescriptor()), ct); - /// - /// GET request to the cat.fielddata API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-field-data/ - /// - public CatResponse Fielddata(ICatFielddataRequest request) => DoCat(request); - /// - /// GET request to the cat.fielddata API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-field-data/ - /// - public Task> FielddataAsync(ICatFielddataRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.health API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-health/ - /// - public CatResponse Health(Func selector = null) => Health(selector.InvokeOrDefault(new CatHealthDescriptor())); - /// - /// GET request to the cat.health API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-health/ - /// - public Task> HealthAsync(Func selector = null, CancellationToken ct = default) => HealthAsync(selector.InvokeOrDefault(new CatHealthDescriptor()), ct); - /// - /// GET request to the cat.health API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-health/ - /// - public CatResponse Health(ICatHealthRequest request) => DoCat(request); - /// - /// GET request to the cat.health API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-health/ - /// - public Task> HealthAsync(ICatHealthRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.help API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/index/ - /// - public CatResponse Help(Func selector = null) => Help(selector.InvokeOrDefault(new CatHelpDescriptor())); - /// - /// GET request to the cat.help API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/index/ - /// - public Task> HelpAsync(Func selector = null, CancellationToken ct = default) => HelpAsync(selector.InvokeOrDefault(new CatHelpDescriptor()), ct); - /// - /// GET request to the cat.help API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/index/ - /// - public CatResponse Help(ICatHelpRequest request) => DoCat(request); - /// - /// GET request to the cat.help API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/index/ - /// - public Task> HelpAsync(ICatHelpRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.indices API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-indices/ - /// - public CatResponse Indices(Func selector = null) => Indices(selector.InvokeOrDefault(new CatIndicesDescriptor())); - /// - /// GET request to the cat.indices API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-indices/ - /// - public Task> IndicesAsync(Func selector = null, CancellationToken ct = default) => IndicesAsync(selector.InvokeOrDefault(new CatIndicesDescriptor()), ct); - /// - /// GET request to the cat.indices API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-indices/ - /// - public CatResponse Indices(ICatIndicesRequest request) => DoCat(request); - /// - /// GET request to the cat.indices API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-indices/ - /// - public Task> IndicesAsync(ICatIndicesRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.master API, read more about this API online: - /// - /// https://opensearch.org/docs/1.2/opensearch/rest-api/cat/cat-master/ - /// Deprecated as of OpenSearch 2.0, use instead - /// - public CatResponse Master(Func selector = null) => Master(selector.InvokeOrDefault(new CatMasterDescriptor())); - /// - /// GET request to the cat.master API, read more about this API online: - /// - /// https://opensearch.org/docs/1.2/opensearch/rest-api/cat/cat-master/ - /// Deprecated as of OpenSearch 2.0, use instead - /// - public Task> MasterAsync(Func selector = null, CancellationToken ct = default) => MasterAsync(selector.InvokeOrDefault(new CatMasterDescriptor()), ct); - /// - /// GET request to the cat.master API, read more about this API online: - /// - /// https://opensearch.org/docs/1.2/opensearch/rest-api/cat/cat-master/ - /// Deprecated as of OpenSearch 2.0, use instead - /// - public CatResponse Master(ICatMasterRequest request) => DoCat(request); - /// - /// GET request to the cat.master API, read more about this API online: - /// - /// https://opensearch.org/docs/1.2/opensearch/rest-api/cat/cat-master/ - /// Deprecated as of OpenSearch 2.0, use instead - /// - public Task> MasterAsync(ICatMasterRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.cluster_manager API, read more about this API online: - /// - /// https://opensearch.org/docs/2.0/opensearch/rest-api/cat/cat-cluster_manager/ - /// Introduced in OpenSearch 2.0 instead of - /// - public CatResponse ClusterManager(Func selector = null) => ClusterManager(selector.InvokeOrDefault(new CatClusterManagerDescriptor())); - /// - /// GET request to the cat.cluster_manager API, read more about this API online: - /// - /// https://opensearch.org/docs/2.0/opensearch/rest-api/cat/cat-cluster_manager/ - /// Introduced in OpenSearch 2.0 instead of - /// - public Task> ClusterManagerAsync(Func selector = null, CancellationToken ct = default) => ClusterManagerAsync(selector.InvokeOrDefault(new CatClusterManagerDescriptor()), ct); - /// - /// GET request to the cat.cluster_manager API, read more about this API online: - /// - /// https://opensearch.org/docs/2.0/opensearch/rest-api/cat/cat-cluster_manager/ - /// Introduced in OpenSearch 2.0 instead of - /// - public CatResponse ClusterManager(ICatClusterManagerRequest request) => DoCat(request); - /// - /// GET request to the cat.cluster_manager API, read more about this API online: - /// - /// https://opensearch.org/docs/2.0/opensearch/rest-api/cat/cat-cluster_manager/ - /// Introduced in OpenSearch 2.0 instead of - /// - public Task> ClusterManagerAsync(ICatClusterManagerRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.nodeattrs API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodeattrs/ - /// - public CatResponse NodeAttributes(Func selector = null) => NodeAttributes(selector.InvokeOrDefault(new CatNodeAttributesDescriptor())); - /// - /// GET request to the cat.nodeattrs API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodeattrs/ - /// - public Task> NodeAttributesAsync(Func selector = null, CancellationToken ct = default) => NodeAttributesAsync(selector.InvokeOrDefault(new CatNodeAttributesDescriptor()), ct); - /// - /// GET request to the cat.nodeattrs API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodeattrs/ - /// - public CatResponse NodeAttributes(ICatNodeAttributesRequest request) => DoCat(request); - /// - /// GET request to the cat.nodeattrs API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodeattrs/ - /// - public Task> NodeAttributesAsync(ICatNodeAttributesRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.nodes API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/ - /// - public CatResponse Nodes(Func selector = null) => Nodes(selector.InvokeOrDefault(new CatNodesDescriptor())); - /// - /// GET request to the cat.nodes API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/ - /// - public Task> NodesAsync(Func selector = null, CancellationToken ct = default) => NodesAsync(selector.InvokeOrDefault(new CatNodesDescriptor()), ct); - /// - /// GET request to the cat.nodes API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/ - /// - public CatResponse Nodes(ICatNodesRequest request) => DoCat(request); - /// - /// GET request to the cat.nodes API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-nodes/ - /// - public Task> NodesAsync(ICatNodesRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.pending_tasks API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/ - /// - public CatResponse PendingTasks(Func selector = null) => PendingTasks(selector.InvokeOrDefault(new CatPendingTasksDescriptor())); - /// - /// GET request to the cat.pending_tasks API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/ - /// - public Task> PendingTasksAsync(Func selector = null, CancellationToken ct = default) => PendingTasksAsync(selector.InvokeOrDefault(new CatPendingTasksDescriptor()), ct); - /// - /// GET request to the cat.pending_tasks API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/ - /// - public CatResponse PendingTasks(ICatPendingTasksRequest request) => DoCat(request); - /// - /// GET request to the cat.pending_tasks API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/ - /// - public Task> PendingTasksAsync(ICatPendingTasksRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); /// /// GET request to the cat.plugins API, read more about this API online: /// diff --git a/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs b/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs index 6d2d7b0f71..6a7caf1e77 100644 --- a/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs +++ b/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs @@ -63,15 +63,6 @@ namespace OpenSearch.Client /// public partial class OpenSearchClient : IOpenSearchClient { - ///Cat APIs - public CatNamespace Cat - { - get; - private set; - } - - partial void SetupNamespaces() => Cat = new CatNamespace(this); - /// /// POST request to the bulk API, read more about this API online: /// diff --git a/src/OpenSearch.Client/Requests.Cat.cs b/src/OpenSearch.Client/Requests.Cat.cs index 77d8241f9e..58769013d6 100644 --- a/src/OpenSearch.Client/Requests.Cat.cs +++ b/src/OpenSearch.Client/Requests.Cat.cs @@ -58,917 +58,6 @@ // ReSharper disable RedundantNameQualifier namespace OpenSearch.Client { - [InterfaceDataContract] - public partial interface ICatAliasesRequest : IRequest - { - [IgnoreDataMember] - Names Name - { - get; - } - } - - ///Request for Aliases https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-aliases/ - public partial class CatAliasesRequest : PlainRequestBase, ICatAliasesRequest - { - protected ICatAliasesRequest Self => this; - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatAliases; - ////_cat/aliases - public CatAliasesRequest(): base() - { - } - - ////_cat/aliases/{name} - ///Optional, accepts null - public CatAliasesRequest(Names name): base(r => r.Optional("name", name)) - { - } - - // values part of the url path - [IgnoreDataMember] - Names ICatAliasesRequest.Name => Self.RouteValues.Get("name"); - // Request parameters - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. - public ExpandWildcards? ExpandWildcards - { - get => Q("expand_wildcards"); - set => Q("expand_wildcards", value); - } - - ///a short version of the Accept header, e.g. json, yaml - public string Format - { - get => Q("format"); - set - { - Q("format", value); - SetAcceptHeader(value); - } - } - - ///Comma-separated list of column names to display - public string[] Headers - { - get => Q("h"); - set => Q("h", value); - } - - ///Return help information - public bool? Help - { - get => Q("help"); - set => Q("help", value); - } - - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public bool? Local - { - get => Q("local"); - set => Q("local", value); - } - - ///Comma-separated list of column names or column aliases to sort by - public string[] SortByColumns - { - get => Q("s"); - set => Q("s", value); - } - - ///Verbose mode. Display column headers - public bool? Verbose - { - get => Q("v"); - set => Q("v", value); - } - } - - [InterfaceDataContract] - public partial interface ICatAllocationRequest : IRequest - { - [IgnoreDataMember] - NodeIds NodeId - { - get; - } - } - - ///Request for Allocation https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-allocation/ - public partial class CatAllocationRequest : PlainRequestBase, ICatAllocationRequest - { - protected ICatAllocationRequest Self => this; - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatAllocation; - ////_cat/allocation - public CatAllocationRequest(): base() - { - } - - ////_cat/allocation/{node_id} - ///Optional, accepts null - public CatAllocationRequest(NodeIds nodeId): base(r => r.Optional("node_id", nodeId)) - { - } - - // values part of the url path - [IgnoreDataMember] - NodeIds ICatAllocationRequest.NodeId => Self.RouteValues.Get("node_id"); - // Request parameters - ///The unit in which to display byte values - public Bytes? Bytes - { - get => Q("bytes"); - set => Q("bytes", value); - } - - ///a short version of the Accept header, e.g. json, yaml - public string Format - { - get => Q("format"); - set - { - Q("format", value); - SetAcceptHeader(value); - } - } - - ///Comma-separated list of column names to display - public string[] Headers - { - get => Q("h"); - set => Q("h", value); - } - - ///Return help information - public bool? Help - { - get => Q("help"); - set => Q("help", value); - } - - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public bool? Local - { - get => Q("local"); - set => Q("local", value); - } - - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public Time MasterTimeout - { - get => Q public partial interface IOpenSearchClient { + /// Cat APIs + CatNamespace Cat { get; } + /// Cluster APIs ClusterNamespace Cluster { get; } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Cat.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Cat.cs new file mode 100644 index 0000000000..e917ab3cba --- /dev/null +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Cat.cs @@ -0,0 +1,574 @@ +/* SPDX-License-Identifier: Apache-2.0 +* +* The OpenSearch Contributors require contributions made to +* this file be licensed under the Apache-2.0 license or a +* compatible open source license. +*/ +/* +* Modifications Copyright OpenSearch Contributors. See +* GitHub history for details. +* +* 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. +*/ +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ----------------------------------------------- +// +// This file is automatically generated +// Please do not edit these files manually +// Run the following in the root of the repos: +// +// *NIX : ./build.sh codegen +// Windows : build.bat codegen +// +// ----------------------------------------------- +// ReSharper disable RedundantUsingDirective +using System; +using System.Threading; +using System.Threading.Tasks; +using OpenSearch.Net.Specification.CatApi; + +// ReSharper disable once CheckNamespace +// ReSharper disable RedundantTypeArgumentsOfMethod +namespace OpenSearch.Client.Specification.CatApi +{ + /// + /// Cat APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial class CatNamespace : NamespacedClientProxy + { + internal CatNamespace(OpenSearchClient client) + : base(client) { } + + /// + /// GET request to the cat.aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ + /// + public CatResponse Aliases( + Func selector = null + ) => Aliases(selector.InvokeOrDefault(new CatAliasesDescriptor())); + + /// + /// GET request to the cat.aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ + /// + public Task> AliasesAsync( + Func selector = null, + CancellationToken ct = default + ) => AliasesAsync(selector.InvokeOrDefault(new CatAliasesDescriptor()), ct); + + /// + /// GET request to the cat.aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ + /// + public CatResponse Aliases(ICatAliasesRequest request) => + DoCat(request); + + /// + /// GET request to the cat.aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ + /// + public Task> AliasesAsync( + ICatAliasesRequest request, + CancellationToken ct = default + ) => + DoCatAsync( + request, + ct + ); + + /// + /// GET request to the cat.allocation API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ + /// + public CatResponse Allocation( + Func selector = null + ) => Allocation(selector.InvokeOrDefault(new CatAllocationDescriptor())); + + /// + /// GET request to the cat.allocation API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ + /// + public Task> AllocationAsync( + Func selector = null, + CancellationToken ct = default + ) => AllocationAsync(selector.InvokeOrDefault(new CatAllocationDescriptor()), ct); + + /// + /// GET request to the cat.allocation API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ + /// + public CatResponse Allocation(ICatAllocationRequest request) => + DoCat( + request + ); + + /// + /// GET request to the cat.allocation API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ + /// + public Task> AllocationAsync( + ICatAllocationRequest request, + CancellationToken ct = default + ) => + DoCatAsync( + request, + ct + ); + + /// + /// GET request to the cat.cluster_manager API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public CatResponse ClusterManager( + Func selector = null + ) => ClusterManager(selector.InvokeOrDefault(new CatClusterManagerDescriptor())); + + /// + /// GET request to the cat.cluster_manager API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public Task> ClusterManagerAsync( + Func selector = null, + CancellationToken ct = default + ) => ClusterManagerAsync(selector.InvokeOrDefault(new CatClusterManagerDescriptor()), ct); + + /// + /// GET request to the cat.cluster_manager API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public CatResponse ClusterManager( + ICatClusterManagerRequest request + ) => + DoCat< + ICatClusterManagerRequest, + CatClusterManagerRequestParameters, + CatClusterManagerRecord + >(request); + + /// + /// GET request to the cat.cluster_manager API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public Task> ClusterManagerAsync( + ICatClusterManagerRequest request, + CancellationToken ct = default + ) => + DoCatAsync< + ICatClusterManagerRequest, + CatClusterManagerRequestParameters, + CatClusterManagerRecord + >(request, ct); + + /// + /// GET request to the cat.count API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-count/ + /// + public CatResponse Count( + Func selector = null + ) => Count(selector.InvokeOrDefault(new CatCountDescriptor())); + + /// + /// GET request to the cat.count API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-count/ + /// + public Task> CountAsync( + Func selector = null, + CancellationToken ct = default + ) => CountAsync(selector.InvokeOrDefault(new CatCountDescriptor()), ct); + + /// + /// GET request to the cat.count API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-count/ + /// + public CatResponse Count(ICatCountRequest request) => + DoCat(request); + + /// + /// GET request to the cat.count API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-count/ + /// + public Task> CountAsync( + ICatCountRequest request, + CancellationToken ct = default + ) => DoCatAsync(request, ct); + + /// + /// GET request to the cat.fielddata API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ + /// + public CatResponse Fielddata( + Func selector = null + ) => Fielddata(selector.InvokeOrDefault(new CatFielddataDescriptor())); + + /// + /// GET request to the cat.fielddata API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ + /// + public Task> FielddataAsync( + Func selector = null, + CancellationToken ct = default + ) => FielddataAsync(selector.InvokeOrDefault(new CatFielddataDescriptor()), ct); + + /// + /// GET request to the cat.fielddata API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ + /// + public CatResponse Fielddata(ICatFielddataRequest request) => + DoCat(request); + + /// + /// GET request to the cat.fielddata API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ + /// + public Task> FielddataAsync( + ICatFielddataRequest request, + CancellationToken ct = default + ) => + DoCatAsync( + request, + ct + ); + + /// + /// GET request to the cat.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-health/ + /// + public CatResponse Health( + Func selector = null + ) => Health(selector.InvokeOrDefault(new CatHealthDescriptor())); + + /// + /// GET request to the cat.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-health/ + /// + public Task> HealthAsync( + Func selector = null, + CancellationToken ct = default + ) => HealthAsync(selector.InvokeOrDefault(new CatHealthDescriptor()), ct); + + /// + /// GET request to the cat.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-health/ + /// + public CatResponse Health(ICatHealthRequest request) => + DoCat(request); + + /// + /// GET request to the cat.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-health/ + /// + public Task> HealthAsync( + ICatHealthRequest request, + CancellationToken ct = default + ) => + DoCatAsync(request, ct); + + /// + /// GET request to the cat.help API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/index/ + /// + public CatResponse Help( + Func selector = null + ) => Help(selector.InvokeOrDefault(new CatHelpDescriptor())); + + /// + /// GET request to the cat.help API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/index/ + /// + public Task> HelpAsync( + Func selector = null, + CancellationToken ct = default + ) => HelpAsync(selector.InvokeOrDefault(new CatHelpDescriptor()), ct); + + /// + /// GET request to the cat.help API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/index/ + /// + public CatResponse Help(ICatHelpRequest request) => + DoCat(request); + + /// + /// GET request to the cat.help API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/index/ + /// + public Task> HelpAsync( + ICatHelpRequest request, + CancellationToken ct = default + ) => DoCatAsync(request, ct); + + /// + /// GET request to the cat.indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ + /// + public CatResponse Indices( + Func selector = null + ) => Indices(selector.InvokeOrDefault(new CatIndicesDescriptor())); + + /// + /// GET request to the cat.indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ + /// + public Task> IndicesAsync( + Func selector = null, + CancellationToken ct = default + ) => IndicesAsync(selector.InvokeOrDefault(new CatIndicesDescriptor()), ct); + + /// + /// GET request to the cat.indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ + /// + public CatResponse Indices(ICatIndicesRequest request) => + DoCat(request); + + /// + /// GET request to the cat.indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ + /// + public Task> IndicesAsync( + ICatIndicesRequest request, + CancellationToken ct = default + ) => + DoCatAsync( + request, + ct + ); + + /// + /// GET request to the cat.master API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + [Obsolete( + "Deprecated as of: 2.0, reason: To promote inclusive language, please use '/_cat/cluster_manager' instead." + )] + public CatResponse Master( + Func selector = null + ) => Master(selector.InvokeOrDefault(new CatMasterDescriptor())); + + /// + /// GET request to the cat.master API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + [Obsolete( + "Deprecated as of: 2.0, reason: To promote inclusive language, please use '/_cat/cluster_manager' instead." + )] + public Task> MasterAsync( + Func selector = null, + CancellationToken ct = default + ) => MasterAsync(selector.InvokeOrDefault(new CatMasterDescriptor()), ct); + + /// + /// GET request to the cat.master API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + [Obsolete( + "Deprecated as of: 2.0, reason: To promote inclusive language, please use '/_cat/cluster_manager' instead." + )] + public CatResponse Master(ICatMasterRequest request) => + DoCat(request); + + /// + /// GET request to the cat.master API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + [Obsolete( + "Deprecated as of: 2.0, reason: To promote inclusive language, please use '/_cat/cluster_manager' instead." + )] + public Task> MasterAsync( + ICatMasterRequest request, + CancellationToken ct = default + ) => + DoCatAsync(request, ct); + + /// + /// GET request to the cat.nodeattrs API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ + /// + public CatResponse NodeAttributes( + Func selector = null + ) => NodeAttributes(selector.InvokeOrDefault(new CatNodeAttributesDescriptor())); + + /// + /// GET request to the cat.nodeattrs API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ + /// + public Task> NodeAttributesAsync( + Func selector = null, + CancellationToken ct = default + ) => NodeAttributesAsync(selector.InvokeOrDefault(new CatNodeAttributesDescriptor()), ct); + + /// + /// GET request to the cat.nodeattrs API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ + /// + public CatResponse NodeAttributes( + ICatNodeAttributesRequest request + ) => + DoCat< + ICatNodeAttributesRequest, + CatNodeAttributesRequestParameters, + CatNodeAttributesRecord + >(request); + + /// + /// GET request to the cat.nodeattrs API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ + /// + public Task> NodeAttributesAsync( + ICatNodeAttributesRequest request, + CancellationToken ct = default + ) => + DoCatAsync< + ICatNodeAttributesRequest, + CatNodeAttributesRequestParameters, + CatNodeAttributesRecord + >(request, ct); + + /// + /// GET request to the cat.nodes API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ + /// + public CatResponse Nodes( + Func selector = null + ) => Nodes(selector.InvokeOrDefault(new CatNodesDescriptor())); + + /// + /// GET request to the cat.nodes API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ + /// + public Task> NodesAsync( + Func selector = null, + CancellationToken ct = default + ) => NodesAsync(selector.InvokeOrDefault(new CatNodesDescriptor()), ct); + + /// + /// GET request to the cat.nodes API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ + /// + public CatResponse Nodes(ICatNodesRequest request) => + DoCat(request); + + /// + /// GET request to the cat.nodes API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ + /// + public Task> NodesAsync( + ICatNodesRequest request, + CancellationToken ct = default + ) => DoCatAsync(request, ct); + + /// + /// GET request to the cat.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ + /// + public CatResponse PendingTasks( + Func selector = null + ) => PendingTasks(selector.InvokeOrDefault(new CatPendingTasksDescriptor())); + + /// + /// GET request to the cat.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ + /// + public Task> PendingTasksAsync( + Func selector = null, + CancellationToken ct = default + ) => PendingTasksAsync(selector.InvokeOrDefault(new CatPendingTasksDescriptor()), ct); + + /// + /// GET request to the cat.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ + /// + public CatResponse PendingTasks(ICatPendingTasksRequest request) => + DoCat( + request + ); + + /// + /// GET request to the cat.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ + /// + public Task> PendingTasksAsync( + ICatPendingTasksRequest request, + CancellationToken ct = default + ) => + DoCatAsync< + ICatPendingTasksRequest, + CatPendingTasksRequestParameters, + CatPendingTasksRecord + >(request, ct); + } +} diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.cs index 28f5994f96..6f12c13f45 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.cs @@ -46,6 +46,7 @@ using System.Threading; using System.Threading.Tasks; using OpenSearch.Client; +using OpenSearch.Client.Specification.CatApi; using OpenSearch.Client.Specification.ClusterApi; using OpenSearch.Client.Specification.DanglingIndicesApi; using OpenSearch.Client.Specification.HttpApi; @@ -63,6 +64,9 @@ namespace OpenSearch.Client /// public partial class OpenSearchClient : IOpenSearchClient { + /// Cat APIs + public CatNamespace Cat { get; private set; } + /// Cluster APIs public ClusterNamespace Cluster { get; private set; } @@ -89,6 +93,7 @@ public partial class OpenSearchClient : IOpenSearchClient partial void SetupGeneratedNamespaces() { + Cat = new CatNamespace(this); Cluster = new ClusterNamespace(this); DanglingIndices = new DanglingIndicesNamespace(this); Indices = new IndicesNamespace(this); diff --git a/src/OpenSearch.Client/_Generated/Requests.Cat.cs b/src/OpenSearch.Client/_Generated/Requests.Cat.cs new file mode 100644 index 0000000000..4eb99419ae --- /dev/null +++ b/src/OpenSearch.Client/_Generated/Requests.Cat.cs @@ -0,0 +1,1023 @@ +/* SPDX-License-Identifier: Apache-2.0 +* +* The OpenSearch Contributors require contributions made to +* this file be licensed under the Apache-2.0 license or a +* compatible open source license. +*/ +/* +* Modifications Copyright OpenSearch Contributors. See +* GitHub history for details. +* +* 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. +*/ +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ----------------------------------------------- +// +// This file is automatically generated +// Please do not edit these files manually +// Run the following in the root of the repos: +// +// *NIX : ./build.sh codegen +// Windows : build.bat codegen +// +// ----------------------------------------------- +// ReSharper disable RedundantUsingDirective +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Runtime.Serialization; +using System.Text; +using OpenSearch.Net; +using OpenSearch.Net.Specification.CatApi; +using OpenSearch.Net.Utf8Json; + +// ReSharper disable RedundantBaseConstructorCall +// ReSharper disable UnusedTypeParameter +// ReSharper disable PartialMethodWithSinglePart +// ReSharper disable RedundantNameQualifier +namespace OpenSearch.Client +{ + [InterfaceDataContract] + public partial interface ICatAliasesRequest : IRequest + { + [IgnoreDataMember] + Names Name { get; } + } + + /// Request for Aliases https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ + public partial class CatAliasesRequest + : PlainRequestBase, + ICatAliasesRequest + { + protected ICatAliasesRequest Self => this; + internal override ApiUrls ApiUrls => ApiUrlsLookups.CatAliases; + + /// /_cat/aliases + public CatAliasesRequest() + : base() { } + + /// /_cat/aliases/{name} + /// Optional, accepts null + public CatAliasesRequest(Names name) + : base(r => r.Optional("name", name)) { } + + // values part of the url path + [IgnoreDataMember] + Names ICatAliasesRequest.Name => Self.RouteValues.Get("name"); + + // Request parameters + /// Whether to expand wildcard expression to concrete indices that are open, closed or both. + public ExpandWildcards? ExpandWildcards + { + get => Q("expand_wildcards"); + set => Q("expand_wildcards", value); + } + + /// A short version of the Accept header, e.g. json, yaml. + public string Format + { + get => Q("format"); + set + { + Q("format", value); + SetAcceptHeader(value); + } + } + + /// Comma-separated list of column names to display. + public string[] Headers + { + get => Q("h"); + set => Q("h", value); + } + + /// Return help information. + public bool? Help + { + get => Q("help"); + set => Q("help", value); + } + + /// Return local information, do not retrieve the state from cluster-manager node. + public bool? Local + { + get => Q("local"); + set => Q("local", value); + } + + /// Comma-separated list of column names or column aliases to sort by. + public string[] SortByColumns + { + get => Q("s"); + set => Q("s", value); + } + + /// Verbose mode. Display column headers. + public bool? Verbose + { + get => Q("v"); + set => Q("v", value); + } + } + + [InterfaceDataContract] + public partial interface ICatAllocationRequest : IRequest + { + [IgnoreDataMember] + NodeIds NodeId { get; } + } + + /// Request for Allocation https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ + public partial class CatAllocationRequest + : PlainRequestBase, + ICatAllocationRequest + { + protected ICatAllocationRequest Self => this; + internal override ApiUrls ApiUrls => ApiUrlsLookups.CatAllocation; + + /// /_cat/allocation + public CatAllocationRequest() + : base() { } + + /// /_cat/allocation/{node_id} + /// Optional, accepts null + public CatAllocationRequest(NodeIds nodeId) + : base(r => r.Optional("node_id", nodeId)) { } + + // values part of the url path + [IgnoreDataMember] + NodeIds ICatAllocationRequest.NodeId => Self.RouteValues.Get("node_id"); + + // Request parameters + /// The unit in which to display byte values. + public Bytes? Bytes + { + get => Q("bytes"); + set => Q("bytes", value); + } + + /// Operation timeout for connection to cluster-manager node. + /// Supported by OpenSearch servers of version 2.0.0 or greater. + public Time ClusterManagerTimeout + { + get => Q