From 2817b38e61b3a34b2eb59bfd4fc3f7d6de5ab6ce Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Thu, 14 Apr 2022 12:58:20 +0100 Subject: [PATCH] Add List Dandling Indices API (#6306) --- .../_Generated/Api/ApiUrlsLookup.g.cs | 1 + ...lingIndicesListDanglingIndicesRequest.g.cs | 53 +++++++++++++++++ ...ingIndicesListDanglingIndicesResponse.g.cs | 31 ++++++++++ .../ElasticsearchClient.DanglingIndices.g.cs | 59 +++++++++++++++++++ .../Client/ElasticsearchClient.g.cs | 4 ++ .../Types/DanglingIndices/DanglingIndex.g.cs | 45 ++++++++++++++ 6 files changed, 193 insertions(+) create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/DanglingIndicesListDanglingIndicesRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/DanglingIndicesListDanglingIndicesResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.DanglingIndices.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/DanglingIndices/DanglingIndex.g.cs diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs index b5f36db9ad3..c0edbb39c0b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs @@ -59,6 +59,7 @@ internal static class ApiUrlsLookups internal static ApiUrls ClusterStats = new ApiUrls(new[] { "/_cluster/stats", "/_cluster/stats/nodes/{node_id}" }); internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "/_count", "/{index}/_count" }); internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "/{index}/_create/{id}" }); + internal static ApiUrls DanglingIndicesListDanglingIndices = new ApiUrls(new[] { "/_dangling" }); internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "/{index}/_delete_by_query" }); internal static ApiUrls NoNamespaceDeleteByQueryRethrottle = new ApiUrls(new[] { "/_delete_by_query/{task_id}/_rethrottle" }); internal static ApiUrls NoNamespaceDelete = new ApiUrls(new[] { "/{index}/_doc/{id}" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/DanglingIndicesListDanglingIndicesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/DanglingIndicesListDanglingIndicesRequest.g.cs new file mode 100644 index 00000000000..0a5aace55bb --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/DanglingIndicesListDanglingIndicesRequest.g.cs @@ -0,0 +1,53 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.DanglingIndices +{ + public class DanglingIndicesListDanglingIndicesRequestParameters : RequestParameters + { + } + + public partial class DanglingIndicesListDanglingIndicesRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.DanglingIndicesListDanglingIndices; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + } + + public sealed partial class DanglingIndicesListDanglingIndicesRequestDescriptor : RequestDescriptorBase + { + internal DanglingIndicesListDanglingIndicesRequestDescriptor(Action configure) => configure.Invoke(this); + public DanglingIndicesListDanglingIndicesRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.DanglingIndicesListDanglingIndices; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/DanglingIndicesListDanglingIndicesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/DanglingIndicesListDanglingIndicesResponse.g.cs new file mode 100644 index 00000000000..3c3aab59517 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DanglingIndices/DanglingIndicesListDanglingIndicesResponse.g.cs @@ -0,0 +1,31 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using Elastic.Transport.Products.Elasticsearch; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.DanglingIndices +{ + public partial class DanglingIndicesListDanglingIndicesResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("dangling_indices")] + public IReadOnlyCollection DanglingIndices { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.DanglingIndices.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.DanglingIndices.g.cs new file mode 100644 index 00000000000..34c1c104e09 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.DanglingIndices.g.cs @@ -0,0 +1,59 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Threading; +using System.Threading.Tasks; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.DanglingIndices +{ + public class DanglingIndicesNamespace : NamespacedClientProxy + { + internal DanglingIndicesNamespace(ElasticsearchClient client) : base(client) + { + } + + public DanglingIndicesListDanglingIndicesResponse ListDanglingIndices(DanglingIndicesListDanglingIndicesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task ListDanglingIndicesAsync(DanglingIndicesListDanglingIndicesRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public DanglingIndicesListDanglingIndicesResponse ListDanglingIndices(Action configureRequest = null) + { + var descriptor = new DanglingIndicesListDanglingIndicesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task ListDanglingIndicesAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new DanglingIndicesListDanglingIndicesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs index 115d348b99b..fa3922bec39 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -19,6 +19,7 @@ using Elastic.Clients.Elasticsearch.Autoscaling; using Elastic.Clients.Elasticsearch.Ccr; using Elastic.Clients.Elasticsearch.Cluster; +using Elastic.Clients.Elasticsearch.DanglingIndices; using Elastic.Clients.Elasticsearch.Enrich; using Elastic.Clients.Elasticsearch.Eql; using Elastic.Clients.Elasticsearch.Graph; @@ -49,6 +50,8 @@ public partial class ElasticsearchClient public ClusterNamespace Cluster { get; private set; } + public DanglingIndicesNamespace DanglingIndices { get; private set; } + public EnrichNamespace Enrich { get; private set; } public EqlNamespace Eql { get; private set; } @@ -81,6 +84,7 @@ private partial void SetupNamespaces() Autoscaling = new AutoscalingNamespace(this); Ccr = new CcrNamespace(this); Cluster = new ClusterNamespace(this); + DanglingIndices = new DanglingIndicesNamespace(this); Enrich = new EnrichNamespace(this); Eql = new EqlNamespace(this); Graph = new GraphNamespace(this); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DanglingIndices/DanglingIndex.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DanglingIndices/DanglingIndex.g.cs new file mode 100644 index 00000000000..01e7e55ccda --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DanglingIndices/DanglingIndex.g.cs @@ -0,0 +1,45 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.DanglingIndices +{ + public partial class DanglingIndex + { + [JsonInclude] + [JsonPropertyName("creation_date_millis")] + public Elastic.Clients.Elasticsearch.EpochMillis CreationDateMillis { get; init; } + + [JsonInclude] + [JsonPropertyName("index_name")] + public string IndexName { get; init; } + + [JsonInclude] + [JsonPropertyName("index_uuid")] + public string IndexUuid { get; init; } + + [JsonInclude] + [JsonPropertyName("node_ids")] + public Elastic.Clients.Elasticsearch.Ids NodeIds { get; init; } + } +} \ No newline at end of file