Skip to content

Commit

Permalink
Cleanup old IndexTemplateV2 methods that have been replaced
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Nov 28, 2023
1 parent e9cc758 commit 1f9ba3d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,42 +518,6 @@ public bool? Local
}
}

///<summary>Request options for ExistsTemplate <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
public class ExistsIndexTemplateRequestParameters : RequestParameters<ExistsIndexTemplateRequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD;
public override bool SupportsBody => false;
///<summary>Return settings in flat format (default: false)</summary>
public bool? FlatSettings
{
get => Q<bool? >("flat_settings");
set => Q("flat_settings", value);
}

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

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

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

///<summary>Request options for TemplateExists <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
public class IndexTemplateExistsRequestParameters : RequestParameters<IndexTemplateExistsRequestParameters>
{
Expand Down Expand Up @@ -920,42 +884,6 @@ public bool? Local
}
}

///<summary>Request options for GetTemplateV2 <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
public class GetIndexTemplateV2RequestParameters : RequestParameters<GetIndexTemplateV2RequestParameters>
{
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
public override bool SupportsBody => false;
///<summary>Return settings in flat format (default: false)</summary>
public bool? FlatSettings
{
get => Q<bool? >("flat_settings");
set => Q("flat_settings", value);
}

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

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

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

///<summary>Request options for GetMapping <para>https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/</para></summary>
public class GetMappingRequestParameters : RequestParameters<GetMappingRequestParameters>
{
Expand Down
31 changes: 0 additions & 31 deletions src/OpenSearch.Net/OpenSearchLowLevelClient.Indices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,6 @@ public TResponse AliasExists<TResponse>(string index, string name, AliasExistsRe
[MapsApi("indices.exists_alias", "index, name")]
public Task<TResponse> AliasExistsAsync<TResponse>(string index, string name, AliasExistsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync<TResponse>(HEAD, Url($"{index:index}/_alias/{name:name}"), ctx, null, RequestParams(requestParameters));
///<summary>HEAD on /_index_template/{name} <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
///<param name = "name">The name of the template</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
public TResponse ExistsTemplateForAll<TResponse>(string name, ExistsIndexTemplateRequestParameters requestParameters = null)
where TResponse : class, IOpenSearchResponse, new() => DoRequest<TResponse>(HEAD, Url($"_index_template/{name:name}"), null, RequestParams(requestParameters));
///<summary>HEAD on /_index_template/{name} <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
///<param name = "name">The name of the template</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
[MapsApi("indices.exists_index_template", "name")]
public Task<TResponse> ExistsTemplateForAllAsync<TResponse>(string name, ExistsIndexTemplateRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync<TResponse>(HEAD, Url($"_index_template/{name:name}"), ctx, null, RequestParams(requestParameters));
///<summary>HEAD on /_template/{name} <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
///<param name = "name">The comma separated names of the index templates</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
Expand Down Expand Up @@ -388,26 +377,6 @@ public TResponse GetFieldMapping<TResponse>(string index, string fields, GetFiel
[MapsApi("indices.get_field_mapping", "index, fields")]
public Task<TResponse> GetFieldMappingAsync<TResponse>(string index, string fields, GetFieldMappingRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"{index:index}/_mapping/field/{fields:fields}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_index_template <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
public TResponse GetTemplateV2ForAll<TResponse>(GetIndexTemplateV2RequestParameters requestParameters = null)
where TResponse : class, IOpenSearchResponse, new() => DoRequest<TResponse>(GET, "_index_template", null, RequestParams(requestParameters));
///<summary>GET on /_index_template <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
[MapsApi("indices.get_index_template", "")]
public Task<TResponse> GetTemplateV2ForAllAsync<TResponse>(GetIndexTemplateV2RequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync<TResponse>(GET, "_index_template", ctx, null, RequestParams(requestParameters));
///<summary>GET on /_index_template/{name} <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
///<param name = "name">The comma separated names of the index templates</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
public TResponse GetTemplateV2ForAll<TResponse>(string name, GetIndexTemplateV2RequestParameters requestParameters = null)
where TResponse : class, IOpenSearchResponse, new() => DoRequest<TResponse>(GET, Url($"_index_template/{name:name}"), null, RequestParams(requestParameters));
///<summary>GET on /_index_template/{name} <para>https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/</para></summary>
///<param name = "name">The comma separated names of the index templates</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
[MapsApi("indices.get_index_template", "name")]
public Task<TResponse> GetTemplateV2ForAllAsync<TResponse>(string name, GetIndexTemplateV2RequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_index_template/{name:name}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_mapping <para>https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
public TResponse GetMappingForAll<TResponse>(GetMappingRequestParameters requestParameters = null)
Expand Down

0 comments on commit 1f9ba3d

Please sign in to comment.