diff --git a/src/OpenSearch.Net/Api/RequestParameters/RequestParameters.Indices.cs b/src/OpenSearch.Net/Api/RequestParameters/RequestParameters.Indices.cs index d4c8d056ce..64ccb1bf5e 100644 --- a/src/OpenSearch.Net/Api/RequestParameters/RequestParameters.Indices.cs +++ b/src/OpenSearch.Net/Api/RequestParameters/RequestParameters.Indices.cs @@ -518,42 +518,6 @@ public bool? Local } } - ///Request options for ExistsTemplate https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - public class ExistsIndexTemplateRequestParameters : RequestParameters - { - public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD; - public override bool SupportsBody => false; - ///Return settings in flat format (default: false) - public bool? FlatSettings - { - get => Q("flat_settings"); - set => Q("flat_settings", 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 TimeSpan MasterTimeout - { - get => Q("master_timeout"); - set => Q("master_timeout", value); - } - - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public TimeSpan ClusterManagerTimeout - { - get => Q("cluster_manager_timeout"); - set => Q("cluster_manager_timeout", value); - } - } - ///Request options for TemplateExists https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ public class IndexTemplateExistsRequestParameters : RequestParameters { @@ -920,42 +884,6 @@ public bool? Local } } - ///Request options for GetTemplateV2 https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - public class GetIndexTemplateV2RequestParameters : RequestParameters - { - public override HttpMethod DefaultHttpMethod => HttpMethod.GET; - public override bool SupportsBody => false; - ///Return settings in flat format (default: false) - public bool? FlatSettings - { - get => Q("flat_settings"); - set => Q("flat_settings", 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 TimeSpan MasterTimeout - { - get => Q("master_timeout"); - set => Q("master_timeout", value); - } - - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public TimeSpan ClusterManagerTimeout - { - get => Q("cluster_manager_timeout"); - set => Q("cluster_manager_timeout", value); - } - } - ///Request options for GetMapping https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ public class GetMappingRequestParameters : RequestParameters { diff --git a/src/OpenSearch.Net/OpenSearchLowLevelClient.Indices.cs b/src/OpenSearch.Net/OpenSearchLowLevelClient.Indices.cs index 391712eac4..e815d6af01 100644 --- a/src/OpenSearch.Net/OpenSearchLowLevelClient.Indices.cs +++ b/src/OpenSearch.Net/OpenSearchLowLevelClient.Indices.cs @@ -232,17 +232,6 @@ public TResponse AliasExists(string index, string name, AliasExistsRe [MapsApi("indices.exists_alias", "index, name")] public Task AliasExistsAsync(string index, string name, AliasExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_alias/{name:name}"), ctx, null, RequestParams(requestParameters)); - ///HEAD on /_index_template/{name} https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - ///The name of the template - ///Request specific configuration such as querystring parameters & request specific connection settings. - public TResponse ExistsTemplateForAll(string name, ExistsIndexTemplateRequestParameters requestParameters = null) - where TResponse : class, IOpenSearchResponse, new() => DoRequest(HEAD, Url($"_index_template/{name:name}"), null, RequestParams(requestParameters)); - ///HEAD on /_index_template/{name} https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - ///The name of the template - ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi("indices.exists_index_template", "name")] - public Task ExistsTemplateForAllAsync(string name, ExistsIndexTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) - where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(HEAD, Url($"_index_template/{name:name}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /_template/{name} https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ ///The comma separated names of the index templates ///Request specific configuration such as querystring parameters & request specific connection settings. @@ -388,26 +377,6 @@ public TResponse GetFieldMapping(string index, string fields, GetFiel [MapsApi("indices.get_field_mapping", "index, fields")] public Task GetFieldMappingAsync(string index, string fields, GetFieldMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_mapping/field/{fields:fields}"), ctx, null, RequestParams(requestParameters)); - ///GET on /_index_template https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - ///Request specific configuration such as querystring parameters & request specific connection settings. - public TResponse GetTemplateV2ForAll(GetIndexTemplateV2RequestParameters requestParameters = null) - where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, "_index_template", null, RequestParams(requestParameters)); - ///GET on /_index_template https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi("indices.get_index_template", "")] - public Task GetTemplateV2ForAllAsync(GetIndexTemplateV2RequestParameters requestParameters = null, CancellationToken ctx = default) - where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, "_index_template", ctx, null, RequestParams(requestParameters)); - ///GET on /_index_template/{name} https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - ///The comma separated names of the index templates - ///Request specific configuration such as querystring parameters & request specific connection settings. - public TResponse GetTemplateV2ForAll(string name, GetIndexTemplateV2RequestParameters requestParameters = null) - where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, Url($"_index_template/{name:name}"), null, RequestParams(requestParameters)); - ///GET on /_index_template/{name} https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - ///The comma separated names of the index templates - ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi("indices.get_index_template", "name")] - public Task GetTemplateV2ForAllAsync(string name, GetIndexTemplateV2RequestParameters requestParameters = null, CancellationToken ctx = default) - where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, Url($"_index_template/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_mapping https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse GetMappingForAll(GetMappingRequestParameters requestParameters = null)