diff --git a/src/ApiGenerator/Configuration/CodeConfiguration.cs b/src/ApiGenerator/Configuration/CodeConfiguration.cs index d65029e9a56..80baf26d45d 100644 --- a/src/ApiGenerator/Configuration/CodeConfiguration.cs +++ b/src/ApiGenerator/Configuration/CodeConfiguration.cs @@ -35,9 +35,6 @@ public static class CodeConfiguration public static string[] IgnoredApisHighLevel { get; } = { - "dangling_indices.list_dangling_indices.json", // TODO: implement - "dangling_indices.import_dangling_index.json", // TODO: implement - "dangling_indices.delete_dangling_index.json", // TODO: implement "indices.add_block.json", // TODO: implement "indices.resolve_index.json", // TODO: implement "security.clear_cached_privileges.json", // TODO: implement diff --git a/src/ApiGenerator/Domain/Specification/UrlPart.cs b/src/ApiGenerator/Domain/Specification/UrlPart.cs index e74feb7db34..d5e496ae833 100644 --- a/src/ApiGenerator/Domain/Specification/UrlPart.cs +++ b/src/ApiGenerator/Domain/Specification/UrlPart.cs @@ -104,6 +104,8 @@ public string HighLevelTypeName case "type": return Type == "string" ? "Name" : "Names"; + case "index_uuid": + return "IndexUuid"; //This forces a compilation error post code generation as intended default: return Type + "_"; diff --git a/src/Nest/CommonAbstractions/Infer/IndexUuid/IndexUuid.cs b/src/Nest/CommonAbstractions/Infer/IndexUuid/IndexUuid.cs new file mode 100644 index 00000000000..cae1f50a840 --- /dev/null +++ b/src/Nest/CommonAbstractions/Infer/IndexUuid/IndexUuid.cs @@ -0,0 +1,43 @@ +// 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 + +using System; +using Elasticsearch.Net; + +namespace Nest +{ + public class IndexUuid : IUrlParameter, IEquatable + { + public string Value { get; } + + public IndexUuid(string value) => Value = value ?? throw new ArgumentNullException(nameof(value)); + + public string GetString(IConnectionConfigurationValues settings) => Value; + + public bool Equals(IndexUuid other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + + return Value == other.Value; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != GetType()) return false; + + return Equals((IndexUuid)obj); + } + + public override int GetHashCode() => (Value != null ? Value.GetHashCode() : 0); + + public static bool operator ==(IndexUuid left, IndexUuid right) => Equals(left, right); + + public static bool operator !=(IndexUuid left, IndexUuid right) => !Equals(left, right); + + public static implicit operator IndexUuid(string value) => string.IsNullOrEmpty(value) ? null : new IndexUuid(value); + } +} diff --git a/src/Nest/CommonAbstractions/Request/RouteValues.cs b/src/Nest/CommonAbstractions/Request/RouteValues.cs index b9cc9c67bd6..30630223501 100644 --- a/src/Nest/CommonAbstractions/Request/RouteValues.cs +++ b/src/Nest/CommonAbstractions/Request/RouteValues.cs @@ -50,14 +50,14 @@ private RouteValues Route(string name, IUrlParameter routeValue, bool required = } internal RouteValues Required(string route, IUrlParameter value) => Route(route, value); - + internal RouteValues Optional(string route, IUrlParameter value) => Route(route, value, false); internal RouteValues Optional(string route, Metrics value) => Route(route, value, false); internal RouteValues Optional(string route, IndexMetrics value) => Route(route, value, false); - internal TActual Get(string route) + internal TActual Get(string route) { if (TryGetValue(route, out var actual) && actual != null) return (TActual)actual; diff --git a/src/Nest/DanglingIndices/Delete/DeleteDanglingIndexRequest.cs b/src/Nest/DanglingIndices/Delete/DeleteDanglingIndexRequest.cs new file mode 100644 index 00000000000..e31f9382bac --- /dev/null +++ b/src/Nest/DanglingIndices/Delete/DeleteDanglingIndexRequest.cs @@ -0,0 +1,22 @@ +// 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 + +namespace Nest +{ + [MapsApi("dangling_indices.delete_dangling_index.json")] + public partial interface IDeleteDanglingIndexRequest + { + + } + + public partial class DeleteDanglingIndexRequest : IDeleteDanglingIndexRequest + { + + } + + public partial class DeleteDanglingIndexDescriptor : IDeleteDanglingIndexRequest + { + + } +} diff --git a/src/Nest/DanglingIndices/Delete/DeleteDanglingIndexResponse.cs b/src/Nest/DanglingIndices/Delete/DeleteDanglingIndexResponse.cs new file mode 100644 index 00000000000..c4a9cea5e68 --- /dev/null +++ b/src/Nest/DanglingIndices/Delete/DeleteDanglingIndexResponse.cs @@ -0,0 +1,14 @@ +// 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 + +using System.Runtime.Serialization; + +namespace Nest +{ + [DataContract] + public class DeleteDanglingIndexResponse : AcknowledgedResponseBase + { + + } +} diff --git a/src/Nest/DanglingIndices/Import/ImportDanglingIndexRequest.cs b/src/Nest/DanglingIndices/Import/ImportDanglingIndexRequest.cs new file mode 100644 index 00000000000..58c309b0a32 --- /dev/null +++ b/src/Nest/DanglingIndices/Import/ImportDanglingIndexRequest.cs @@ -0,0 +1,22 @@ +// 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 + +namespace Nest +{ + [MapsApi("dangling_indices.import_dangling_index.json")] + public partial interface IImportDanglingIndexRequest + { + + } + + public partial class ImportDanglingIndexRequest : IImportDanglingIndexRequest + { + + } + + public partial class ImportDanglingIndexDescriptor : IImportDanglingIndexRequest + { + + } +} diff --git a/src/Nest/DanglingIndices/Import/ImportDanglingIndexResponse.cs b/src/Nest/DanglingIndices/Import/ImportDanglingIndexResponse.cs new file mode 100644 index 00000000000..ff299e0e24c --- /dev/null +++ b/src/Nest/DanglingIndices/Import/ImportDanglingIndexResponse.cs @@ -0,0 +1,13 @@ +// 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 + +using System.Runtime.Serialization; + +namespace Nest +{ + [DataContract] + public class ImportDanglingIndexResponse : AcknowledgedResponseBase + { + } +} diff --git a/src/Nest/DanglingIndices/List/ListDanglingIndicesRequest.cs b/src/Nest/DanglingIndices/List/ListDanglingIndicesRequest.cs new file mode 100644 index 00000000000..b1975187ef2 --- /dev/null +++ b/src/Nest/DanglingIndices/List/ListDanglingIndicesRequest.cs @@ -0,0 +1,22 @@ +// 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 + +namespace Nest +{ + [MapsApi("dangling_indices.list_dangling_indices.json")] + public partial interface IListDanglingIndicesRequest + { + + } + + public partial class ListDanglingIndicesRequest : IListDanglingIndicesRequest + { + + } + + public partial class ListDanglingIndicesDescriptor : IListDanglingIndicesRequest + { + + } +} diff --git a/src/Nest/DanglingIndices/List/ListDanglingIndicesResponse.cs b/src/Nest/DanglingIndices/List/ListDanglingIndicesResponse.cs new file mode 100644 index 00000000000..289e73d17ce --- /dev/null +++ b/src/Nest/DanglingIndices/List/ListDanglingIndicesResponse.cs @@ -0,0 +1,47 @@ +// 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 + +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Elasticsearch.Net; + +namespace Nest +{ + [DataContract] + public class ListDanglingIndicesResponse : ResponseBase + { + [DataMember(Name = "dangling_indices")] + public IReadOnlyCollection DanglingIndices { get; internal set; } = + EmptyReadOnly.Collection; + } + + public class AggregatedDanglingIndexInfo + { + private DateTimeOffset? _creationDate; + + [DataMember(Name = "index_name")] + public string IndexName { get; internal set; } + + [DataMember(Name = "index_uuid")] + public string IndexUUID { get; internal set; } + + [DataMember(Name = "creation_date_millis")] + public long CreationDateInMilliseconds { get; internal set; } + + [DataMember(Name = "creation_date")] + public DateTimeOffset CreationDate + { + get + { + _creationDate ??= DateTimeOffset.FromUnixTimeMilliseconds(CreationDateInMilliseconds); + return _creationDate.Value; + } + internal set => _creationDate = value; + } + + [DataMember(Name = "node_ids")] + public IReadOnlyCollection NodeIds { get; internal set; } + } +} diff --git a/src/Nest/Descriptors.DanglingIndices.cs b/src/Nest/Descriptors.DanglingIndices.cs new file mode 100644 index 00000000000..d77c22aff87 --- /dev/null +++ b/src/Nest/Descriptors.DanglingIndices.cs @@ -0,0 +1,94 @@ +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ----------------------------------------------- +// +// 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.Text; +using System.Linq.Expressions; +using Elasticsearch.Net; +using Elasticsearch.Net.Utf8Json; +using Elasticsearch.Net.Specification.DanglingIndicesApi; + +// ReSharper disable RedundantBaseConstructorCall +// ReSharper disable UnusedTypeParameter +// ReSharper disable PartialMethodWithSinglePart +// ReSharper disable RedundantNameQualifier +namespace Nest +{ + ///Descriptor for DeleteDanglingIndex https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + public partial class DeleteDanglingIndexDescriptor : RequestDescriptorBase, IDeleteDanglingIndexRequest + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.DanglingIndicesDeleteDanglingIndex; + ////_dangling/{index_uuid} + ///this parameter is required + public DeleteDanglingIndexDescriptor(IndexUuid indexUuid): base(r => r.Required("index_uuid", indexUuid)) + { + } + + ///Used for serialization purposes, making sure we have a parameterless constructor + [SerializationConstructor] + protected DeleteDanglingIndexDescriptor(): base() + { + } + + // values part of the url path + IndexUuid IDeleteDanglingIndexRequest.IndexUuid => Self.RouteValues.Get("index_uuid"); + // Request parameters + ///Must be set to true in order to delete the dangling index + public DeleteDanglingIndexDescriptor AcceptDataLoss(bool? acceptdataloss = true) => Qs("accept_data_loss", acceptdataloss); + ///Specify timeout for connection to master + public DeleteDanglingIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); + ///Explicit operation timeout + public DeleteDanglingIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); + } + + ///Descriptor for ImportDanglingIndex https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + public partial class ImportDanglingIndexDescriptor : RequestDescriptorBase, IImportDanglingIndexRequest + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.DanglingIndicesImportDanglingIndex; + ////_dangling/{index_uuid} + ///this parameter is required + public ImportDanglingIndexDescriptor(IndexUuid indexUuid): base(r => r.Required("index_uuid", indexUuid)) + { + } + + ///Used for serialization purposes, making sure we have a parameterless constructor + [SerializationConstructor] + protected ImportDanglingIndexDescriptor(): base() + { + } + + // values part of the url path + IndexUuid IImportDanglingIndexRequest.IndexUuid => Self.RouteValues.Get("index_uuid"); + // Request parameters + ///Must be set to true in order to import the dangling index + public ImportDanglingIndexDescriptor AcceptDataLoss(bool? acceptdataloss = true) => Qs("accept_data_loss", acceptdataloss); + ///Specify timeout for connection to master + public ImportDanglingIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); + ///Explicit operation timeout + public ImportDanglingIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); + } + + ///Descriptor for List https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + public partial class ListDanglingIndicesDescriptor : RequestDescriptorBase, IListDanglingIndicesRequest + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.DanglingIndicesList; + // values part of the url path + // Request parameters + } +} \ No newline at end of file diff --git a/src/Nest/ElasticClient.DanglingIndices.cs b/src/Nest/ElasticClient.DanglingIndices.cs new file mode 100644 index 00000000000..210c0bd790a --- /dev/null +++ b/src/Nest/ElasticClient.DanglingIndices.cs @@ -0,0 +1,112 @@ +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ----------------------------------------------- +// +// 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 Elasticsearch.Net.Specification.DanglingIndicesApi; + +// ReSharper disable once CheckNamespace +// ReSharper disable RedundantTypeArgumentsOfMethod +namespace Nest.Specification.DanglingIndicesApi +{ + /// + /// Dangling Indices APIs. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public class DanglingIndicesNamespace : NamespacedClientProxy + { + internal DanglingIndicesNamespace(ElasticClient client): base(client) + { + } + + /// + /// DELETE request to the dangling_indices.delete_dangling_index API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public DeleteDanglingIndexResponse DeleteDanglingIndex(IndexUuid indexUuid, Func selector = null) => DeleteDanglingIndex(selector.InvokeOrDefault(new DeleteDanglingIndexDescriptor(indexUuid: indexUuid))); + /// + /// DELETE request to the dangling_indices.delete_dangling_index API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public Task DeleteDanglingIndexAsync(IndexUuid indexUuid, Func selector = null, CancellationToken ct = default) => DeleteDanglingIndexAsync(selector.InvokeOrDefault(new DeleteDanglingIndexDescriptor(indexUuid: indexUuid)), ct); + /// + /// DELETE request to the dangling_indices.delete_dangling_index API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public DeleteDanglingIndexResponse DeleteDanglingIndex(IDeleteDanglingIndexRequest request) => DoRequest(request, request.RequestParameters); + /// + /// DELETE request to the dangling_indices.delete_dangling_index API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public Task DeleteDanglingIndexAsync(IDeleteDanglingIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); + /// + /// POST request to the dangling_indices.import_dangling_index API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public ImportDanglingIndexResponse ImportDanglingIndex(IndexUuid indexUuid, Func selector = null) => ImportDanglingIndex(selector.InvokeOrDefault(new ImportDanglingIndexDescriptor(indexUuid: indexUuid))); + /// + /// POST request to the dangling_indices.import_dangling_index API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public Task ImportDanglingIndexAsync(IndexUuid indexUuid, Func selector = null, CancellationToken ct = default) => ImportDanglingIndexAsync(selector.InvokeOrDefault(new ImportDanglingIndexDescriptor(indexUuid: indexUuid)), ct); + /// + /// POST request to the dangling_indices.import_dangling_index API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public ImportDanglingIndexResponse ImportDanglingIndex(IImportDanglingIndexRequest request) => DoRequest(request, request.RequestParameters); + /// + /// POST request to the dangling_indices.import_dangling_index API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public Task ImportDanglingIndexAsync(IImportDanglingIndexRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); + /// + /// GET request to the dangling_indices.list_dangling_indices API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public ListDanglingIndicesResponse List(Func selector = null) => List(selector.InvokeOrDefault(new ListDanglingIndicesDescriptor())); + /// + /// GET request to the dangling_indices.list_dangling_indices API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public Task ListAsync(Func selector = null, CancellationToken ct = default) => ListAsync(selector.InvokeOrDefault(new ListDanglingIndicesDescriptor()), ct); + /// + /// GET request to the dangling_indices.list_dangling_indices API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public ListDanglingIndicesResponse List(IListDanglingIndicesRequest request) => DoRequest(request, request.RequestParameters); + /// + /// GET request to the dangling_indices.list_dangling_indices API, read more about this API online: + /// + /// https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + /// + public Task ListAsync(IListDanglingIndicesRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct); + } +} \ No newline at end of file diff --git a/src/Nest/ElasticClient.NoNamespace.cs b/src/Nest/ElasticClient.NoNamespace.cs index f32a26aeae1..f83ee5bc2db 100644 --- a/src/Nest/ElasticClient.NoNamespace.cs +++ b/src/Nest/ElasticClient.NoNamespace.cs @@ -23,6 +23,7 @@ using Nest.Specification.CatApi; using Nest.Specification.ClusterApi; using Nest.Specification.CrossClusterReplicationApi; +using Nest.Specification.DanglingIndicesApi; using Nest.Specification.EnrichApi; using Nest.Specification.GraphApi; using Nest.Specification.IndexLifecycleManagementApi; @@ -78,6 +79,13 @@ public CrossClusterReplicationNamespace CrossClusterReplication private set; } + ///Dangling Indices APIs + public DanglingIndicesNamespace DanglingIndices + { + get; + private set; + } + ///Enrich APIs public EnrichNamespace Enrich { @@ -210,6 +218,7 @@ partial void SetupNamespaces() Cat = new CatNamespace(this); Cluster = new ClusterNamespace(this); CrossClusterReplication = new CrossClusterReplicationNamespace(this); + DanglingIndices = new DanglingIndicesNamespace(this); Enrich = new EnrichNamespace(this); Graph = new GraphNamespace(this); IndexLifecycleManagement = new IndexLifecycleManagementNamespace(this); diff --git a/src/Nest/IElasticClient.Generated.cs b/src/Nest/IElasticClient.Generated.cs index 5bbc0bd14d0..8fc26d64964 100644 --- a/src/Nest/IElasticClient.Generated.cs +++ b/src/Nest/IElasticClient.Generated.cs @@ -25,6 +25,7 @@ using Nest.Specification.CatApi; using Nest.Specification.ClusterApi; using Nest.Specification.CrossClusterReplicationApi; +using Nest.Specification.DanglingIndicesApi; using Nest.Specification.EnrichApi; using Nest.Specification.GraphApi; using Nest.Specification.IndexLifecycleManagementApi; @@ -75,6 +76,12 @@ CrossClusterReplicationNamespace CrossClusterReplication get; } + ///Dangling Indices APIs + DanglingIndicesNamespace DanglingIndices + { + get; + } + ///Enrich APIs EnrichNamespace Enrich { diff --git a/src/Nest/Requests.DanglingIndices.cs b/src/Nest/Requests.DanglingIndices.cs new file mode 100644 index 00000000000..72471dcc3a0 --- /dev/null +++ b/src/Nest/Requests.DanglingIndices.cs @@ -0,0 +1,153 @@ +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ----------------------------------------------- +// +// 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.Text; +using System.Linq.Expressions; +using System.Runtime.Serialization; +using Elasticsearch.Net; +using Elasticsearch.Net.Utf8Json; +using Elasticsearch.Net.Specification.DanglingIndicesApi; + +// ReSharper disable RedundantBaseConstructorCall +// ReSharper disable UnusedTypeParameter +// ReSharper disable PartialMethodWithSinglePart +// ReSharper disable RedundantNameQualifier +namespace Nest +{ + [InterfaceDataContract] + public partial interface IDeleteDanglingIndexRequest : IRequest + { + [IgnoreDataMember] + IndexUuid IndexUuid + { + get; + } + } + + ///Request for DeleteDanglingIndex https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html + public partial class DeleteDanglingIndexRequest : PlainRequestBase, IDeleteDanglingIndexRequest + { + protected IDeleteDanglingIndexRequest Self => this; + internal override ApiUrls ApiUrls => ApiUrlsLookups.DanglingIndicesDeleteDanglingIndex; + ////_dangling/{index_uuid} + ///this parameter is required + public DeleteDanglingIndexRequest(IndexUuid indexUuid): base(r => r.Required("index_uuid", indexUuid)) + { + } + + ///Used for serialization purposes, making sure we have a parameterless constructor + [SerializationConstructor] + protected DeleteDanglingIndexRequest(): base() + { + } + + // values part of the url path + [IgnoreDataMember] + IndexUuid IDeleteDanglingIndexRequest.IndexUuid => Self.RouteValues.Get("index_uuid"); + // Request parameters + ///Must be set to true in order to delete the dangling index + public bool? AcceptDataLoss + { + get => Q("accept_data_loss"); + set => Q("accept_data_loss", value); + } + + ///Specify timeout for connection to master + public Time MasterTimeout + { + get => Q