From b3eff8b5bc1a4f41c7d36a6522279b70fac347ee Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Sat, 26 Mar 2022 14:23:56 +0000 Subject: [PATCH] Add various indices APIs (#6223) --- .../_Generated/Api/ApiUrlsLookup.g.cs | 14 + .../Api/IndexManagement/AliasRequest.g.cs | 154 ++++++ .../Api/IndexManagement/AliasResponse.g.cs | 28 ++ .../Api/IndexManagement/CloseRequest.g.cs | 138 +++++ .../Api/IndexManagement/CloseResponse.g.cs | 39 ++ .../CreateDataStreamRequest.g.cs | 67 +++ .../CreateDataStreamResponse.g.cs | 31 ++ .../IndexManagement/DataStreamRequest.g.cs | 72 +++ .../IndexManagement/DataStreamResponse.g.cs | 31 ++ .../IndexManagement/DeleteAliasRequest.g.cs | 118 +++++ .../IndexManagement/DeleteAliasResponse.g.cs | 31 ++ .../DeleteDataStreamRequest.g.cs | 72 +++ .../DeleteDataStreamResponse.g.cs | 31 ++ .../IndexManagement/ExistsAliasRequest.g.cs | 146 ++++++ .../IndexManagement/ExistsAliasResponse.g.cs | 28 ++ .../MigrateToDataStreamRequest.g.cs | 67 +++ .../MigrateToDataStreamResponse.g.cs | 31 ++ .../Api/IndexManagement/OpenRequest.g.cs | 138 +++++ .../Api/IndexManagement/OpenResponse.g.cs | 35 ++ .../PromoteDataStreamRequest.g.cs | 67 +++ .../PromoteDataStreamResponse.g.cs | 28 ++ .../Api/IndexManagement/PutAliasRequest.g.cs | 346 +++++++++++++ .../Api/IndexManagement/PutAliasResponse.g.cs | 31 ++ .../Api/IndexManagement/ShrinkRequest.g.cs | 194 +++++++ .../Api/IndexManagement/ShrinkResponse.g.cs | 39 ++ .../Api/IndexManagement/SplitRequest.g.cs | 194 +++++++ .../Api/IndexManagement/SplitResponse.g.cs | 39 ++ .../IndexManagement/UpdateAliasesRequest.g.cs | 85 ++++ .../UpdateAliasesResponse.g.cs | 31 ++ .../ElasticsearchClient.IndexManagement.g.cs | 392 +++++++++++++++ .../Types/IndexManagement/Action.g.cs | 227 +++++++++ .../Types/IndexManagement/AddAction.g.cs | 475 ++++++++++++++++++ .../Types/IndexManagement/Alias.g.cs | 313 ++++++++++++ .../IndexManagement/CloseIndexResult.g.cs | 37 ++ .../IndexManagement/CloseShardResult.g.cs | 33 ++ .../IndicesGetDataStreamItem.g.cs | 69 +++ .../IndicesGetDataStreamItemIndex.g.cs | 37 ++ ...ndicesGetDataStreamItemTimestampField.g.cs | 33 ++ .../Types/IndexManagement/RemoveAction.g.cs | 135 +++++ .../IndexManagement/RemoveIndexAction.g.cs | 99 ++++ 40 files changed, 4175 insertions(+) create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AliasRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AliasResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DataStreamRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DataStreamResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Action.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseIndexResult.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseShardResult.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItem.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItemIndex.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItemTimestampField.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.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 e230bac4be1..ae650a07ae7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs @@ -55,9 +55,23 @@ internal static class ApiUrlsLookups internal static ApiUrls IndexLifecycleManagementRetry = new ApiUrls(new[] { "/{index}/_ilm/retry" }); internal static ApiUrls IndexLifecycleManagementStart = new ApiUrls(new[] { "/_ilm/start" }); internal static ApiUrls IndexLifecycleManagementStop = new ApiUrls(new[] { "/_ilm/stop" }); + internal static ApiUrls IndexManagementGetAlias = new ApiUrls(new[] { "/_alias", "/_alias/{name}", "/{index}/_alias/{name}", "/{index}/_alias" }); + internal static ApiUrls IndexManagementClose = new ApiUrls(new[] { "/{index}/_close" }); + internal static ApiUrls IndexManagementCreateDataStream = new ApiUrls(new[] { "/_data_stream/{name}" }); + internal static ApiUrls IndexManagementGetDataStream = new ApiUrls(new[] { "/_data_stream", "/_data_stream/{name}" }); + internal static ApiUrls IndexManagementDeleteAlias = new ApiUrls(new[] { "/{index}/_alias/{name}" }); + internal static ApiUrls IndexManagementDeleteDataStream = new ApiUrls(new[] { "/_data_stream/{name}" }); internal static ApiUrls IndexManagementDelete = new ApiUrls(new[] { "/{index}" }); + internal static ApiUrls IndexManagementExistsAlias = new ApiUrls(new[] { "/_alias/{name}", "/{index}/_alias/{name}" }); internal static ApiUrls IndexManagementExists = new ApiUrls(new[] { "/{index}" }); + internal static ApiUrls IndexManagementMigrateToDataStream = new ApiUrls(new[] { "/_data_stream/_migrate/{name}" }); + internal static ApiUrls IndexManagementOpen = new ApiUrls(new[] { "/{index}/_open" }); + internal static ApiUrls IndexManagementPromoteDataStream = new ApiUrls(new[] { "/_data_stream/_promote/{name}" }); + internal static ApiUrls IndexManagementPutAlias = new ApiUrls(new[] { "/{index}/_alias/{name}" }); internal static ApiUrls IndexManagementRefresh = new ApiUrls(new[] { "/_refresh", "/{index}/_refresh" }); + internal static ApiUrls IndexManagementShrink = new ApiUrls(new[] { "/{index}/_shrink/{target}" }); + internal static ApiUrls IndexManagementSplit = new ApiUrls(new[] { "/{index}/_split/{target}" }); + internal static ApiUrls IndexManagementUpdateAliases = new ApiUrls(new[] { "/_aliases" }); internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "/{index}/_doc/{id}", "/{index}/_doc" }); internal static ApiUrls IngestDeletePipeline = new ApiUrls(new[] { "/_ingest/pipeline/{id}" }); internal static ApiUrls IngestGeoIpStats = new ApiUrls(new[] { "/_ingest/geoip/stats" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AliasRequest.g.cs new file mode 100644 index 00000000000..dbc69f0c780 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AliasRequest.g.cs @@ -0,0 +1,154 @@ +// 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.IndexManagement +{ + public class AliasRequestParameters : RequestParameters + { + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public bool? Local { get => Q("local"); set => Q("local", value); } + } + + public partial class AliasRequest : PlainRequestBase + { + public AliasRequest() + { + } + + public AliasRequest(Elastic.Clients.Elasticsearch.Names? name) : base(r => r.Optional("name", name)) + { + } + + public AliasRequest(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name) : base(r => r.Optional("index", indices).Optional("name", name)) + { + } + + public AliasRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementGetAlias; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public bool? Local { get => Q("local"); set => Q("local", value); } + } + + public sealed partial class AliasRequestDescriptor : RequestDescriptorBase, AliasRequestParameters> + { + internal AliasRequestDescriptor(Action> configure) => configure.Invoke(this); + public AliasRequestDescriptor() + { + } + + public AliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name) : base(r => r.Optional("index", indices).Optional("name", name)) + { + } + + public AliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementGetAlias; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + public AliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public AliasRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public AliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public AliasRequestDescriptor Local(bool? local = true) => Qs("local", local); + public AliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names? name) + { + RouteValues.Optional("name", name); + return Self; + } + + public AliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + RouteValues.Optional("index", indices); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } + + public sealed partial class AliasRequestDescriptor : RequestDescriptorBase + { + internal AliasRequestDescriptor(Action configure) => configure.Invoke(this); + public AliasRequestDescriptor() + { + } + + public AliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names? name) : base(r => r.Optional("index", indices).Optional("name", name)) + { + } + + public AliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementGetAlias; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + public AliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public AliasRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public AliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public AliasRequestDescriptor Local(bool? local = true) => Qs("local", local); + public AliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names? name) + { + RouteValues.Optional("name", name); + return Self; + } + + public AliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + RouteValues.Optional("index", indices); + return Self; + } + + 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/IndexManagement/AliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AliasResponse.g.cs new file mode 100644 index 00000000000..6f894f0b55d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AliasResponse.g.cs @@ -0,0 +1,28 @@ +// 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.IndexManagement +{ + public partial class AliasResponse : ElasticsearchResponseBase + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseRequest.g.cs new file mode 100644 index 00000000000..878ba95999f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseRequest.g.cs @@ -0,0 +1,138 @@ +// 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.IndexManagement +{ + public class CloseRequestParameters : RequestParameters + { + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + } + + public partial class CloseRequest : PlainRequestBase + { + public CloseRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementClose; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + } + + public sealed partial class CloseRequestDescriptor : RequestDescriptorBase, CloseRequestParameters> + { + internal CloseRequestDescriptor(Action> configure) => configure.Invoke(this); + public CloseRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal CloseRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementClose; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public CloseRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public CloseRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public CloseRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public CloseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public CloseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public CloseRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); + public CloseRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } + + public sealed partial class CloseRequestDescriptor : RequestDescriptorBase + { + internal CloseRequestDescriptor(Action configure) => configure.Invoke(this); + public CloseRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal CloseRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementClose; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public CloseRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public CloseRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public CloseRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public CloseRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public CloseRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public CloseRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); + public CloseRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + 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/IndexManagement/CloseResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseResponse.g.cs new file mode 100644 index 00000000000..27d2918c31f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CloseResponse.g.cs @@ -0,0 +1,39 @@ +// 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.IndexManagement +{ + public partial class CloseResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + + [JsonInclude] + [JsonPropertyName("indices")] + public Dictionary Indices { get; init; } + + [JsonInclude] + [JsonPropertyName("shards_acknowledged")] + public bool ShardsAcknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs new file mode 100644 index 00000000000..6dbc2b901dd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamRequest.g.cs @@ -0,0 +1,67 @@ +// 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.IndexManagement +{ + public class CreateDataStreamRequestParameters : RequestParameters + { + } + + public partial class CreateDataStreamRequest : PlainRequestBase + { + public CreateDataStreamRequest(Elastic.Clients.Elasticsearch.DataStreamName name) : base(r => r.Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementCreateDataStream; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => false; + } + + public sealed partial class CreateDataStreamRequestDescriptor : RequestDescriptorBase + { + internal CreateDataStreamRequestDescriptor(Action configure) => configure.Invoke(this); + public CreateDataStreamRequestDescriptor(Elastic.Clients.Elasticsearch.DataStreamName name) : base(r => r.Required("name", name)) + { + } + + internal CreateDataStreamRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementCreateDataStream; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => false; + public CreateDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.DataStreamName name) + { + RouteValues.Required("name", name); + return Self; + } + + 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/IndexManagement/CreateDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamResponse.g.cs new file mode 100644 index 00000000000..ca9b4be8222 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateDataStreamResponse.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.IndexManagement +{ + public partial class CreateDataStreamResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DataStreamRequest.g.cs new file mode 100644 index 00000000000..f2419a8fa8d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DataStreamRequest.g.cs @@ -0,0 +1,72 @@ +// 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.IndexManagement +{ + public class DataStreamRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + } + + public partial class DataStreamRequest : PlainRequestBase + { + public DataStreamRequest() + { + } + + public DataStreamRequest(Elastic.Clients.Elasticsearch.DataStreamNames? name) : base(r => r.Optional("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementGetDataStream; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + } + + public sealed partial class DataStreamRequestDescriptor : RequestDescriptorBase + { + internal DataStreamRequestDescriptor(Action configure) => configure.Invoke(this); + public DataStreamRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementGetDataStream; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + public DataStreamRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public DataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.DataStreamNames? name) + { + RouteValues.Optional("name", name); + return Self; + } + + 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/IndexManagement/DataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DataStreamResponse.g.cs new file mode 100644 index 00000000000..bb5eeadc42e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DataStreamResponse.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.IndexManagement +{ + public partial class DataStreamResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("data_streams")] + public IReadOnlyCollection DataStreams { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs new file mode 100644 index 00000000000..a8528721f04 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasRequest.g.cs @@ -0,0 +1,118 @@ +// 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.IndexManagement +{ + public class DeleteAliasRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + } + + public partial class DeleteAliasRequest : PlainRequestBase + { + public DeleteAliasRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name) : base(r => r.Required("index", indices).Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementDeleteAlias; + protected override HttpMethod HttpMethod => HttpMethod.DELETE; + protected override bool SupportsBody => false; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + } + + public sealed partial class DeleteAliasRequestDescriptor : RequestDescriptorBase, DeleteAliasRequestParameters> + { + internal DeleteAliasRequestDescriptor(Action> configure) => configure.Invoke(this); + public DeleteAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name) : base(r => r.Required("index", indices).Required("name", name)) + { + } + + internal DeleteAliasRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementDeleteAlias; + protected override HttpMethod HttpMethod => HttpMethod.DELETE; + protected override bool SupportsBody => false; + public DeleteAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public DeleteAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public DeleteAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + public DeleteAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names name) + { + RouteValues.Required("name", name); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } + + public sealed partial class DeleteAliasRequestDescriptor : RequestDescriptorBase + { + internal DeleteAliasRequestDescriptor(Action configure) => configure.Invoke(this); + public DeleteAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name) : base(r => r.Required("index", indices).Required("name", name)) + { + } + + internal DeleteAliasRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementDeleteAlias; + protected override HttpMethod HttpMethod => HttpMethod.DELETE; + protected override bool SupportsBody => false; + public DeleteAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public DeleteAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public DeleteAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + public DeleteAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names name) + { + RouteValues.Required("name", name); + return Self; + } + + 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/IndexManagement/DeleteAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasResponse.g.cs new file mode 100644 index 00000000000..e2277b4a60e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteAliasResponse.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.IndexManagement +{ + public partial class DeleteAliasResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs new file mode 100644 index 00000000000..b9fd16c7adf --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamRequest.g.cs @@ -0,0 +1,72 @@ +// 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.IndexManagement +{ + public class DeleteDataStreamRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + } + + public partial class DeleteDataStreamRequest : PlainRequestBase + { + public DeleteDataStreamRequest(Elastic.Clients.Elasticsearch.DataStreamNames name) : base(r => r.Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementDeleteDataStream; + protected override HttpMethod HttpMethod => HttpMethod.DELETE; + protected override bool SupportsBody => false; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + } + + public sealed partial class DeleteDataStreamRequestDescriptor : RequestDescriptorBase + { + internal DeleteDataStreamRequestDescriptor(Action configure) => configure.Invoke(this); + public DeleteDataStreamRequestDescriptor(Elastic.Clients.Elasticsearch.DataStreamNames name) : base(r => r.Required("name", name)) + { + } + + internal DeleteDataStreamRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementDeleteDataStream; + protected override HttpMethod HttpMethod => HttpMethod.DELETE; + protected override bool SupportsBody => false; + public DeleteDataStreamRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public DeleteDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.DataStreamNames name) + { + RouteValues.Required("name", name); + return Self; + } + + 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/IndexManagement/DeleteDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamResponse.g.cs new file mode 100644 index 00000000000..2dacf60466e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteDataStreamResponse.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.IndexManagement +{ + public partial class DeleteDataStreamResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs new file mode 100644 index 00000000000..d7b78592d6f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs @@ -0,0 +1,146 @@ +// 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.IndexManagement +{ + public class ExistsAliasRequestParameters : RequestParameters + { + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public bool? Local { get => Q("local"); set => Q("local", value); } + } + + public partial class ExistsAliasRequest : PlainRequestBase + { + public ExistsAliasRequest(Elastic.Clients.Elasticsearch.Names name) : base(r => r.Required("name", name)) + { + } + + public ExistsAliasRequest(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names name) : base(r => r.Optional("index", indices).Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementExistsAlias; + protected override HttpMethod HttpMethod => HttpMethod.HEAD; + protected override bool SupportsBody => false; + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public bool? Local { get => Q("local"); set => Q("local", value); } + } + + public sealed partial class ExistsAliasRequestDescriptor : RequestDescriptorBase, ExistsAliasRequestParameters> + { + internal ExistsAliasRequestDescriptor(Action> configure) => configure.Invoke(this); + public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Names name) : base(r => r.Required("name", name)) + { + } + + public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names name) : base(r => r.Optional("index", indices).Required("name", name)) + { + } + + internal ExistsAliasRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementExistsAlias; + protected override HttpMethod HttpMethod => HttpMethod.HEAD; + protected override bool SupportsBody => false; + public ExistsAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public ExistsAliasRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public ExistsAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public ExistsAliasRequestDescriptor Local(bool? local = true) => Qs("local", local); + public ExistsAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names name) + { + RouteValues.Required("name", name); + return Self; + } + + public ExistsAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + RouteValues.Optional("index", indices); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } + + public sealed partial class ExistsAliasRequestDescriptor : RequestDescriptorBase + { + internal ExistsAliasRequestDescriptor(Action configure) => configure.Invoke(this); + public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Names name) : base(r => r.Required("name", name)) + { + } + + public ExistsAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices? indices, Elastic.Clients.Elasticsearch.Names name) : base(r => r.Optional("index", indices).Required("name", name)) + { + } + + internal ExistsAliasRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementExistsAlias; + protected override HttpMethod HttpMethod => HttpMethod.HEAD; + protected override bool SupportsBody => false; + public ExistsAliasRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public ExistsAliasRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public ExistsAliasRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public ExistsAliasRequestDescriptor Local(bool? local = true) => Qs("local", local); + public ExistsAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names name) + { + RouteValues.Required("name", name); + return Self; + } + + public ExistsAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + RouteValues.Optional("index", indices); + return Self; + } + + 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/IndexManagement/ExistsAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasResponse.g.cs new file mode 100644 index 00000000000..e1cb8fc8f06 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasResponse.g.cs @@ -0,0 +1,28 @@ +// 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.IndexManagement +{ + public partial class ExistsAliasResponse : ExistsResponseBase + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs new file mode 100644 index 00000000000..12cd0590ff8 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamRequest.g.cs @@ -0,0 +1,67 @@ +// 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.IndexManagement +{ + public class MigrateToDataStreamRequestParameters : RequestParameters + { + } + + public partial class MigrateToDataStreamRequest : PlainRequestBase + { + public MigrateToDataStreamRequest(Elastic.Clients.Elasticsearch.IndexName name) : base(r => r.Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementMigrateToDataStream; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + } + + public sealed partial class MigrateToDataStreamRequestDescriptor : RequestDescriptorBase + { + internal MigrateToDataStreamRequestDescriptor(Action configure) => configure.Invoke(this); + public MigrateToDataStreamRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName name) : base(r => r.Required("name", name)) + { + } + + internal MigrateToDataStreamRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementMigrateToDataStream; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public MigrateToDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.IndexName name) + { + RouteValues.Required("name", name); + return Self; + } + + 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/IndexManagement/MigrateToDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamResponse.g.cs new file mode 100644 index 00000000000..a470a108d59 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/MigrateToDataStreamResponse.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.IndexManagement +{ + public partial class MigrateToDataStreamResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenRequest.g.cs new file mode 100644 index 00000000000..5a57755359d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenRequest.g.cs @@ -0,0 +1,138 @@ +// 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.IndexManagement +{ + public class OpenRequestParameters : RequestParameters + { + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + } + + public partial class OpenRequest : PlainRequestBase + { + public OpenRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementOpen; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + } + + public sealed partial class OpenRequestDescriptor : RequestDescriptorBase, OpenRequestParameters> + { + internal OpenRequestDescriptor(Action> configure) => configure.Invoke(this); + public OpenRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal OpenRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementOpen; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public OpenRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public OpenRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public OpenRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public OpenRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public OpenRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public OpenRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); + public OpenRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } + } + + public sealed partial class OpenRequestDescriptor : RequestDescriptorBase + { + internal OpenRequestDescriptor(Action configure) => configure.Invoke(this); + public OpenRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices) : base(r => r.Required("index", indices)) + { + } + + internal OpenRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementOpen; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public OpenRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public OpenRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public OpenRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public OpenRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public OpenRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public OpenRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); + public OpenRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + 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/IndexManagement/OpenResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenResponse.g.cs new file mode 100644 index 00000000000..6cea3c3924e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/OpenResponse.g.cs @@ -0,0 +1,35 @@ +// 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.IndexManagement +{ + public partial class OpenResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + + [JsonInclude] + [JsonPropertyName("shards_acknowledged")] + public bool ShardsAcknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamRequest.g.cs new file mode 100644 index 00000000000..12e4882c02a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamRequest.g.cs @@ -0,0 +1,67 @@ +// 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.IndexManagement +{ + public class PromoteDataStreamRequestParameters : RequestParameters + { + } + + public partial class PromoteDataStreamRequest : PlainRequestBase + { + public PromoteDataStreamRequest(Elastic.Clients.Elasticsearch.IndexName name) : base(r => r.Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementPromoteDataStream; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + } + + public sealed partial class PromoteDataStreamRequestDescriptor : RequestDescriptorBase + { + internal PromoteDataStreamRequestDescriptor(Action configure) => configure.Invoke(this); + public PromoteDataStreamRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName name) : base(r => r.Required("name", name)) + { + } + + internal PromoteDataStreamRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementPromoteDataStream; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public PromoteDataStreamRequestDescriptor Name(Elastic.Clients.Elasticsearch.IndexName name) + { + RouteValues.Required("name", name); + return Self; + } + + 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/IndexManagement/PromoteDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamResponse.g.cs new file mode 100644 index 00000000000..ff28bf1a895 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamResponse.g.cs @@ -0,0 +1,28 @@ +// 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.IndexManagement +{ + public partial class PromoteDataStreamResponse : ElasticsearchResponseBase + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs new file mode 100644 index 00000000000..08e24aba87e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs @@ -0,0 +1,346 @@ +// 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.IndexManagement +{ + public class PutAliasRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + } + + public partial class PutAliasRequest : PlainRequestBase + { + public PutAliasRequest(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("index", indices).Required("name", name)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementPutAlias; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonInclude] + [JsonPropertyName("filter")] + public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? Filter { get; set; } + + [JsonInclude] + [JsonPropertyName("index_routing")] + public Elastic.Clients.Elasticsearch.Routing? IndexRouting { get; set; } + + [JsonInclude] + [JsonPropertyName("is_write_index")] + public bool? IsWriteIndex { get; set; } + + [JsonInclude] + [JsonPropertyName("routing")] + public Elastic.Clients.Elasticsearch.Routing? Routing { get; set; } + + [JsonInclude] + [JsonPropertyName("search_routing")] + public Elastic.Clients.Elasticsearch.Routing? SearchRouting { get; set; } + } + + public sealed partial class PutAliasRequestDescriptor : RequestDescriptorBase, PutAliasRequestParameters> + { + internal PutAliasRequestDescriptor(Action> configure) => configure.Invoke(this); + public PutAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("index", indices).Required("name", name)) + { + } + + internal PutAliasRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementPutAlias; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + public PutAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public PutAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public PutAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + public PutAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) + { + RouteValues.Required("name", name); + return Self; + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? FilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor FilterDescriptor { get; set; } + + private Action> FilterDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? IndexRoutingValue { get; set; } + + private bool? IsWriteIndexValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? SearchRoutingValue { get; set; } + + public PutAliasRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public PutAliasRequestDescriptor Filter(QueryDsl.QueryContainerDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public PutAliasRequestDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorAction = configure; + return Self; + } + + public PutAliasRequestDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Routing? indexRouting) + { + IndexRoutingValue = indexRouting; + return Self; + } + + public PutAliasRequestDescriptor IsWriteIndex(bool? isWriteIndex = true) + { + IsWriteIndexValue = isWriteIndex; + return Self; + } + + public PutAliasRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) + { + RoutingValue = routing; + return Self; + } + + public PutAliasRequestDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Routing? searchRouting) + { + SearchRoutingValue = searchRouting; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + + if (IndexRoutingValue is not null) + { + writer.WritePropertyName("index_routing"); + JsonSerializer.Serialize(writer, IndexRoutingValue, options); + } + + if (IsWriteIndexValue.HasValue) + { + writer.WritePropertyName("is_write_index"); + writer.WriteBooleanValue(IsWriteIndexValue.Value); + } + + if (RoutingValue is not null) + { + writer.WritePropertyName("routing"); + JsonSerializer.Serialize(writer, RoutingValue, options); + } + + if (SearchRoutingValue is not null) + { + writer.WritePropertyName("search_routing"); + JsonSerializer.Serialize(writer, SearchRoutingValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class PutAliasRequestDescriptor : RequestDescriptorBase + { + internal PutAliasRequestDescriptor(Action configure) => configure.Invoke(this); + public PutAliasRequestDescriptor(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("index", indices).Required("name", name)) + { + } + + internal PutAliasRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementPutAlias; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + public PutAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public PutAliasRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public PutAliasRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices indices) + { + RouteValues.Required("index", indices); + return Self; + } + + public PutAliasRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) + { + RouteValues.Required("name", name); + return Self; + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? FilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor FilterDescriptor { get; set; } + + private Action FilterDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? IndexRoutingValue { get; set; } + + private bool? IsWriteIndexValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? SearchRoutingValue { get; set; } + + public PutAliasRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public PutAliasRequestDescriptor Filter(QueryDsl.QueryContainerDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public PutAliasRequestDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorAction = configure; + return Self; + } + + public PutAliasRequestDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Routing? indexRouting) + { + IndexRoutingValue = indexRouting; + return Self; + } + + public PutAliasRequestDescriptor IsWriteIndex(bool? isWriteIndex = true) + { + IsWriteIndexValue = isWriteIndex; + return Self; + } + + public PutAliasRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) + { + RoutingValue = routing; + return Self; + } + + public PutAliasRequestDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Routing? searchRouting) + { + SearchRoutingValue = searchRouting; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + + if (IndexRoutingValue is not null) + { + writer.WritePropertyName("index_routing"); + JsonSerializer.Serialize(writer, IndexRoutingValue, options); + } + + if (IsWriteIndexValue.HasValue) + { + writer.WritePropertyName("is_write_index"); + writer.WriteBooleanValue(IsWriteIndexValue.Value); + } + + if (RoutingValue is not null) + { + writer.WritePropertyName("routing"); + JsonSerializer.Serialize(writer, RoutingValue, options); + } + + if (SearchRoutingValue is not null) + { + writer.WritePropertyName("search_routing"); + JsonSerializer.Serialize(writer, SearchRoutingValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasResponse.g.cs new file mode 100644 index 00000000000..92541fe6007 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasResponse.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.IndexManagement +{ + public partial class PutAliasResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkRequest.g.cs new file mode 100644 index 00000000000..f606deb781c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkRequest.g.cs @@ -0,0 +1,194 @@ +// 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.IndexManagement +{ + public class ShrinkRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + } + + public partial class ShrinkRequest : PlainRequestBase + { + public ShrinkRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target) : base(r => r.Required("index", index).Required("target", target)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementShrink; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + + [JsonInclude] + [JsonPropertyName("aliases")] + public Dictionary? Aliases { get; set; } + + [JsonInclude] + [JsonPropertyName("settings")] + public Dictionary? Settings { get; set; } + } + + public sealed partial class ShrinkRequestDescriptor : RequestDescriptorBase, ShrinkRequestParameters> + { + internal ShrinkRequestDescriptor(Action> configure) => configure.Invoke(this); + public ShrinkRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target) : base(r => r.Required("index", index).Required("target", target)) + { + } + + internal ShrinkRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementShrink; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + public ShrinkRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public ShrinkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public ShrinkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); + public ShrinkRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + RouteValues.Required("index", index); + return Self; + } + + public ShrinkRequestDescriptor Target(Elastic.Clients.Elasticsearch.IndexName target) + { + RouteValues.Required("target", target); + return Self; + } + + private Dictionary? AliasesValue { get; set; } + + private Dictionary? SettingsValue { get; set; } + + public ShrinkRequestDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public ShrinkRequestDescriptor Settings(Func, FluentDictionary> selector) + { + SettingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class ShrinkRequestDescriptor : RequestDescriptorBase + { + internal ShrinkRequestDescriptor(Action configure) => configure.Invoke(this); + public ShrinkRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target) : base(r => r.Required("index", index).Required("target", target)) + { + } + + internal ShrinkRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementShrink; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + public ShrinkRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public ShrinkRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public ShrinkRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); + public ShrinkRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + RouteValues.Required("index", index); + return Self; + } + + public ShrinkRequestDescriptor Target(Elastic.Clients.Elasticsearch.IndexName target) + { + RouteValues.Required("target", target); + return Self; + } + + private Dictionary? AliasesValue { get; set; } + + private Dictionary? SettingsValue { get; set; } + + public ShrinkRequestDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public ShrinkRequestDescriptor Settings(Func, FluentDictionary> selector) + { + SettingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkResponse.g.cs new file mode 100644 index 00000000000..dc790e377aa --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ShrinkResponse.g.cs @@ -0,0 +1,39 @@ +// 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.IndexManagement +{ + public partial class ShrinkResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public string Index { get; init; } + + [JsonInclude] + [JsonPropertyName("shards_acknowledged")] + public bool ShardsAcknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitRequest.g.cs new file mode 100644 index 00000000000..f8197c806a1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitRequest.g.cs @@ -0,0 +1,194 @@ +// 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.IndexManagement +{ + public class SplitRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + } + + public partial class SplitRequest : PlainRequestBase + { + public SplitRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target) : base(r => r.Required("index", index).Required("target", target)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementSplit; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.WaitForActiveShards? WaitForActiveShards { get => Q("wait_for_active_shards"); set => Q("wait_for_active_shards", value); } + + [JsonInclude] + [JsonPropertyName("aliases")] + public Dictionary? Aliases { get; set; } + + [JsonInclude] + [JsonPropertyName("settings")] + public Dictionary? Settings { get; set; } + } + + public sealed partial class SplitRequestDescriptor : RequestDescriptorBase, SplitRequestParameters> + { + internal SplitRequestDescriptor(Action> configure) => configure.Invoke(this); + public SplitRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target) : base(r => r.Required("index", index).Required("target", target)) + { + } + + internal SplitRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementSplit; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + public SplitRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public SplitRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public SplitRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); + public SplitRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + RouteValues.Required("index", index); + return Self; + } + + public SplitRequestDescriptor Target(Elastic.Clients.Elasticsearch.IndexName target) + { + RouteValues.Required("target", target); + return Self; + } + + private Dictionary? AliasesValue { get; set; } + + private Dictionary? SettingsValue { get; set; } + + public SplitRequestDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SplitRequestDescriptor Settings(Func, FluentDictionary> selector) + { + SettingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class SplitRequestDescriptor : RequestDescriptorBase + { + internal SplitRequestDescriptor(Action configure) => configure.Invoke(this); + public SplitRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target) : base(r => r.Required("index", index).Required("target", target)) + { + } + + internal SplitRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementSplit; + protected override HttpMethod HttpMethod => HttpMethod.PUT; + protected override bool SupportsBody => true; + public SplitRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public SplitRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + public SplitRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); + public SplitRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + RouteValues.Required("index", index); + return Self; + } + + public SplitRequestDescriptor Target(Elastic.Clients.Elasticsearch.IndexName target) + { + RouteValues.Required("target", target); + return Self; + } + + private Dictionary? AliasesValue { get; set; } + + private Dictionary? SettingsValue { get; set; } + + public SplitRequestDescriptor Aliases(Func, FluentDictionary> selector) + { + AliasesValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SplitRequestDescriptor Settings(Func, FluentDictionary> selector) + { + SettingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (SettingsValue is not null) + { + writer.WritePropertyName("settings"); + JsonSerializer.Serialize(writer, SettingsValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitResponse.g.cs new file mode 100644 index 00000000000..4bbeb21c6da --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SplitResponse.g.cs @@ -0,0 +1,39 @@ +// 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.IndexManagement +{ + public partial class SplitResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + + [JsonInclude] + [JsonPropertyName("index")] + public string Index { get; init; } + + [JsonInclude] + [JsonPropertyName("shards_acknowledged")] + public bool ShardsAcknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs new file mode 100644 index 00000000000..778ce76419e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesRequest.g.cs @@ -0,0 +1,85 @@ +// 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.IndexManagement +{ + public class UpdateAliasesRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + } + + public partial class UpdateAliasesRequest : PlainRequestBase + { + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementUpdateAliases; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + [JsonInclude] + [JsonPropertyName("actions")] + public IEnumerable? Actions { get; set; } + } + + public sealed partial class UpdateAliasesRequestDescriptor : RequestDescriptorBase + { + internal UpdateAliasesRequestDescriptor(Action configure) => configure.Invoke(this); + public UpdateAliasesRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexManagementUpdateAliases; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public UpdateAliasesRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public UpdateAliasesRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout); + private IEnumerable? ActionsValue { get; set; } + + public UpdateAliasesRequestDescriptor Actions(IEnumerable? actions) + { + ActionsValue = actions; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (ActionsValue is not null) + { + writer.WritePropertyName("actions"); + JsonSerializer.Serialize(writer, ActionsValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesResponse.g.cs new file mode 100644 index 00000000000..c966c1cf9c2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/UpdateAliasesResponse.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.IndexManagement +{ + public partial class UpdateAliasesResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("acknowledged")] + public bool Acknowledged { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.IndexManagement.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.IndexManagement.g.cs index 82f4675adb7..a5276a89f3d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.IndexManagement.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.IndexManagement.g.cs @@ -28,6 +28,174 @@ internal IndexManagementNamespace(ElasticsearchClient client) : base(client) { } + public AliasResponse Alias(AliasRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task AliasAsync(AliasRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public AliasResponse Alias(Action configureRequest = null) + { + var descriptor = new AliasRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task AliasAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new AliasRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public CloseResponse Close(CloseRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task CloseAsync(CloseRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public CloseResponse Close(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest = null) + { + var descriptor = new CloseRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task CloseAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new CloseRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public CreateDataStreamResponse CreateDataStream(CreateDataStreamRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task CreateDataStreamAsync(CreateDataStreamRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public CreateDataStreamResponse CreateDataStream(Elastic.Clients.Elasticsearch.DataStreamName name, Action configureRequest = null) + { + var descriptor = new CreateDataStreamRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task CreateDataStreamAsync(Elastic.Clients.Elasticsearch.DataStreamName name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new CreateDataStreamRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public DataStreamResponse DataStream(DataStreamRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task DataStreamAsync(DataStreamRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public DataStreamResponse DataStream(Action configureRequest = null) + { + var descriptor = new DataStreamRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task DataStreamAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new DataStreamRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public DeleteAliasResponse DeleteAlias(DeleteAliasRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task DeleteAliasAsync(DeleteAliasRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public DeleteAliasResponse DeleteAlias(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name, Action configureRequest = null) + { + var descriptor = new DeleteAliasRequestDescriptor(indices, name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task DeleteAliasAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Names name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteAliasRequestDescriptor(indices, name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public DeleteDataStreamResponse DeleteDataStream(DeleteDataStreamRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task DeleteDataStreamAsync(DeleteDataStreamRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public DeleteDataStreamResponse DeleteDataStream(Elastic.Clients.Elasticsearch.DataStreamNames name, Action configureRequest = null) + { + var descriptor = new DeleteDataStreamRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task DeleteDataStreamAsync(Elastic.Clients.Elasticsearch.DataStreamNames name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteDataStreamRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + public DeleteResponse Delete(DeleteRequest request) { request.BeforeRequest(); @@ -56,6 +224,34 @@ public Task DeleteAsync(Elastic.Clients.Elasticsearch.Indices in return DoRequestAsync(descriptor); } + public ExistsAliasResponse ExistsAlias(ExistsAliasRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task ExistsAliasAsync(ExistsAliasRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public ExistsAliasResponse ExistsAlias(Elastic.Clients.Elasticsearch.Names name, Action configureRequest = null) + { + var descriptor = new ExistsAliasRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task ExistsAliasAsync(Elastic.Clients.Elasticsearch.Names name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new ExistsAliasRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + public ExistsResponse Exists(ExistsRequest request) { request.BeforeRequest(); @@ -84,6 +280,118 @@ public Task ExistsAsync(Elastic.Clients.Elasticsearch.Indices in return DoRequestAsync(descriptor); } + public MigrateToDataStreamResponse MigrateToDataStream(MigrateToDataStreamRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task MigrateToDataStreamAsync(MigrateToDataStreamRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public MigrateToDataStreamResponse MigrateToDataStream(Elastic.Clients.Elasticsearch.IndexName name, Action configureRequest = null) + { + var descriptor = new MigrateToDataStreamRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task MigrateToDataStreamAsync(Elastic.Clients.Elasticsearch.IndexName name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new MigrateToDataStreamRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public OpenResponse Open(OpenRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task OpenAsync(OpenRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public OpenResponse Open(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest = null) + { + var descriptor = new OpenRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task OpenAsync(Elastic.Clients.Elasticsearch.Indices indices, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new OpenRequestDescriptor(indices); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public PromoteDataStreamResponse PromoteDataStream(PromoteDataStreamRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task PromoteDataStreamAsync(PromoteDataStreamRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public PromoteDataStreamResponse PromoteDataStream(Elastic.Clients.Elasticsearch.IndexName name, Action configureRequest = null) + { + var descriptor = new PromoteDataStreamRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task PromoteDataStreamAsync(Elastic.Clients.Elasticsearch.IndexName name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new PromoteDataStreamRequestDescriptor(name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public PutAliasResponse PutAlias(PutAliasRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task PutAliasAsync(PutAliasRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public PutAliasResponse PutAlias(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Name name, Action configureRequest = null) + { + var descriptor = new PutAliasRequestDescriptor(indices, name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task PutAliasAsync(Elastic.Clients.Elasticsearch.Indices indices, Elastic.Clients.Elasticsearch.Name name, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new PutAliasRequestDescriptor(indices, name); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + public RefreshResponse Refresh(RefreshRequest request) { request.BeforeRequest(); @@ -111,5 +419,89 @@ public Task RefreshAsync(Action confi descriptor.BeforeRequest(); return DoRequestAsync(descriptor); } + + public ShrinkResponse Shrink(ShrinkRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task ShrinkAsync(ShrinkRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public ShrinkResponse Shrink(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action configureRequest = null) + { + var descriptor = new ShrinkRequestDescriptor(index, target); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task ShrinkAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new ShrinkRequestDescriptor(index, target); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SplitResponse Split(SplitRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task SplitAsync(SplitRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SplitResponse Split(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action configureRequest = null) + { + var descriptor = new SplitRequestDescriptor(index, target); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task SplitAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.IndexName target, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SplitRequestDescriptor(index, target); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public UpdateAliasesResponse UpdateAliases(UpdateAliasesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task UpdateAliasesAsync(UpdateAliasesRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public UpdateAliasesResponse UpdateAliases(Action configureRequest = null) + { + var descriptor = new UpdateAliasesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task UpdateAliasesAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new UpdateAliasesRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Action.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Action.g.cs new file mode 100644 index 00000000000..57f4f7f80d5 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Action.g.cs @@ -0,0 +1,227 @@ +// 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.IndexManagement.UpdateAliases +{ + public interface IActionVariant + { + string ActionVariantName { get; } + } + + [JsonConverter(typeof(ActionConverter))] + public partial class Action : IContainer + { + public Action(IActionVariant variant) => Variant = variant ?? throw new ArgumentNullException(nameof(variant)); + internal IActionVariant Variant { get; } + } + + internal sealed class ActionConverter : JsonConverter + { + public override Action Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var readerCopy = reader; + readerCopy.Read(); + if (readerCopy.TokenType != JsonTokenType.PropertyName) + { + throw new JsonException(); + } + + var propertyName = readerCopy.GetString(); + if (propertyName == "add") + { + var variant = JsonSerializer.Deserialize(ref reader, options); + return new Action(variant); + } + + if (propertyName == "remove") + { + var variant = JsonSerializer.Deserialize(ref reader, options); + return new Action(variant); + } + + if (propertyName == "remove_index") + { + var variant = JsonSerializer.Deserialize(ref reader, options); + return new Action(variant); + } + + throw new JsonException(); + } + + public override void Write(Utf8JsonWriter writer, Action value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WritePropertyName(value.Variant.ActionVariantName); + switch (value.Variant) + { + case Elastic.Clients.Elasticsearch.IndexManagement.UpdateAliases.AddAction variant: + JsonSerializer.Serialize(writer, variant, options); + break; + case Elastic.Clients.Elasticsearch.IndexManagement.UpdateAliases.RemoveAction variant: + JsonSerializer.Serialize(writer, variant, options); + break; + case Elastic.Clients.Elasticsearch.IndexManagement.UpdateAliases.RemoveIndexAction variant: + JsonSerializer.Serialize(writer, variant, options); + break; + } + + writer.WriteEndObject(); + } + } + + public sealed partial class ActionDescriptor : DescriptorBase> + { + internal ActionDescriptor(Action> configure) => configure.Invoke(this); + public ActionDescriptor() : base() + { + } + + internal bool ContainsVariant { get; private set; } + + internal string ContainedVariantName { get; private set; } + + internal Action Container { get; private set; } + + internal IDescriptor Descriptor { get; private set; } + + internal Type DescriptorType { get; private set; } + + private void Set(Action descriptorAction, string variantName) + where T : IDescriptor, new() + { + if (ContainsVariant) + throw new Exception("TODO"); + ContainedVariantName = variantName; + ContainsVariant = true; + DescriptorType = typeof(T); + var descriptor = new T(); + descriptorAction?.Invoke(descriptor); + Descriptor = descriptor; + } + + private void Set(IActionVariant variant, string variantName) + { + if (ContainsVariant) + throw new Exception("TODO"); + Container = new Action(variant); + ContainedVariantName = variantName; + ContainsVariant = true; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (!ContainsVariant) + { + writer.WriteNullValue(); + return; + } + + if (Container is not null) + { + JsonSerializer.Serialize(writer, Container, options); + return; + } + + writer.WriteStartObject(); + writer.WritePropertyName(ContainedVariantName); + JsonSerializer.Serialize(writer, Descriptor, DescriptorType, options); + writer.WriteEndObject(); + } + + public void Add(AddAction variant) => Set(variant, "add"); + public void Add(Action> configure) => Set(configure, "add"); + public void Remove(RemoveAction variant) => Set(variant, "remove"); + public void Remove(Action configure) => Set(configure, "remove"); + public void RemoveIndex(RemoveIndexAction variant) => Set(variant, "remove_index"); + public void RemoveIndex(Action configure) => Set(configure, "remove_index"); + } + + public sealed partial class ActionDescriptor : DescriptorBase + { + internal ActionDescriptor(Action configure) => configure.Invoke(this); + public ActionDescriptor() : base() + { + } + + internal bool ContainsVariant { get; private set; } + + internal string ContainedVariantName { get; private set; } + + internal Action Container { get; private set; } + + internal IDescriptor Descriptor { get; private set; } + + internal Type DescriptorType { get; private set; } + + private void Set(Action descriptorAction, string variantName) + where T : IDescriptor, new() + { + if (ContainsVariant) + throw new Exception("TODO"); + ContainedVariantName = variantName; + ContainsVariant = true; + DescriptorType = typeof(T); + var descriptor = new T(); + descriptorAction?.Invoke(descriptor); + Descriptor = descriptor; + } + + private void Set(IActionVariant variant, string variantName) + { + if (ContainsVariant) + throw new Exception("TODO"); + Container = new Action(variant); + ContainedVariantName = variantName; + ContainsVariant = true; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (!ContainsVariant) + { + writer.WriteNullValue(); + return; + } + + if (Container is not null) + { + JsonSerializer.Serialize(writer, Container, options); + return; + } + + writer.WriteStartObject(); + writer.WritePropertyName(ContainedVariantName); + JsonSerializer.Serialize(writer, Descriptor, DescriptorType, options); + writer.WriteEndObject(); + } + + public void Add(AddAction variant) => Set(variant, "add"); + public void Add(Action configure) => Set(configure, "add"); + public void Add(Action> configure) => Set(configure, "add"); + public void Remove(RemoveAction variant) => Set(variant, "remove"); + public void Remove(Action configure) => Set(configure, "remove"); + public void RemoveIndex(RemoveIndexAction variant) => Set(variant, "remove_index"); + public void RemoveIndex(Action configure) => Set(configure, "remove_index"); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs new file mode 100644 index 00000000000..7588c8319a9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs @@ -0,0 +1,475 @@ +// 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.IndexManagement.UpdateAliases +{ + public partial class AddAction : IActionVariant + { + [JsonIgnore] + string IndexManagement.UpdateAliases.IActionVariant.ActionVariantName => "add"; + [JsonInclude] + [JsonPropertyName("alias")] + public Elastic.Clients.Elasticsearch.IndexAlias? Alias { get; set; } + + [JsonInclude] + [JsonPropertyName("aliases")] + public IEnumerable? Aliases { get; set; } + + [JsonInclude] + [JsonPropertyName("filter")] + public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? Filter { get; set; } + + [JsonInclude] + [JsonPropertyName("index")] + public Elastic.Clients.Elasticsearch.IndexName? Index { get; set; } + + [JsonInclude] + [JsonPropertyName("index_routing")] + public Elastic.Clients.Elasticsearch.Routing? IndexRouting { get; set; } + + [JsonInclude] + [JsonPropertyName("indices")] + public Elastic.Clients.Elasticsearch.Indices? Indices { get; set; } + + [JsonInclude] + [JsonPropertyName("is_hidden")] + public bool? IsHidden { get; set; } + + [JsonInclude] + [JsonPropertyName("is_write_index")] + public bool? IsWriteIndex { get; set; } + + [JsonInclude] + [JsonPropertyName("must_exist")] + public bool? MustExist { get; set; } + + [JsonInclude] + [JsonPropertyName("routing")] + public Elastic.Clients.Elasticsearch.Routing? Routing { get; set; } + + [JsonInclude] + [JsonPropertyName("search_routing")] + public Elastic.Clients.Elasticsearch.Routing? SearchRouting { get; set; } + } + + public sealed partial class AddActionDescriptor : DescriptorBase> + { + internal AddActionDescriptor(Action> configure) => configure.Invoke(this); + public AddActionDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? FilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor FilterDescriptor { get; set; } + + private Action> FilterDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.IndexAlias? AliasValue { get; set; } + + private IEnumerable? AliasesValue { get; set; } + + private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? IndexRoutingValue { get; set; } + + private Elastic.Clients.Elasticsearch.Indices? IndicesValue { get; set; } + + private bool? IsHiddenValue { get; set; } + + private bool? IsWriteIndexValue { get; set; } + + private bool? MustExistValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? SearchRoutingValue { get; set; } + + public AddActionDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public AddActionDescriptor Filter(QueryDsl.QueryContainerDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public AddActionDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorAction = configure; + return Self; + } + + public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.IndexAlias? alias) + { + AliasValue = alias; + return Self; + } + + public AddActionDescriptor Aliases(IEnumerable? aliases) + { + AliasesValue = aliases; + return Self; + } + + public AddActionDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + { + IndexValue = index; + return Self; + } + + public AddActionDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Routing? indexRouting) + { + IndexRoutingValue = indexRouting; + return Self; + } + + public AddActionDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + IndicesValue = indices; + return Self; + } + + public AddActionDescriptor IsHidden(bool? isHidden = true) + { + IsHiddenValue = isHidden; + return Self; + } + + public AddActionDescriptor IsWriteIndex(bool? isWriteIndex = true) + { + IsWriteIndexValue = isWriteIndex; + return Self; + } + + public AddActionDescriptor MustExist(bool? mustExist = true) + { + MustExistValue = mustExist; + return Self; + } + + public AddActionDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) + { + RoutingValue = routing; + return Self; + } + + public AddActionDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Routing? searchRouting) + { + SearchRoutingValue = searchRouting; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + + if (AliasValue is not null) + { + writer.WritePropertyName("alias"); + JsonSerializer.Serialize(writer, AliasValue, options); + } + + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + + if (IndexRoutingValue is not null) + { + writer.WritePropertyName("index_routing"); + JsonSerializer.Serialize(writer, IndexRoutingValue, options); + } + + if (IndicesValue is not null) + { + writer.WritePropertyName("indices"); + JsonSerializer.Serialize(writer, IndicesValue, options); + } + + if (IsHiddenValue.HasValue) + { + writer.WritePropertyName("is_hidden"); + writer.WriteBooleanValue(IsHiddenValue.Value); + } + + if (IsWriteIndexValue.HasValue) + { + writer.WritePropertyName("is_write_index"); + writer.WriteBooleanValue(IsWriteIndexValue.Value); + } + + if (MustExistValue.HasValue) + { + writer.WritePropertyName("must_exist"); + writer.WriteBooleanValue(MustExistValue.Value); + } + + if (RoutingValue is not null) + { + writer.WritePropertyName("routing"); + JsonSerializer.Serialize(writer, RoutingValue, options); + } + + if (SearchRoutingValue is not null) + { + writer.WritePropertyName("search_routing"); + JsonSerializer.Serialize(writer, SearchRoutingValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class AddActionDescriptor : DescriptorBase + { + internal AddActionDescriptor(Action configure) => configure.Invoke(this); + public AddActionDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? FilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor FilterDescriptor { get; set; } + + private Action FilterDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.IndexAlias? AliasValue { get; set; } + + private IEnumerable? AliasesValue { get; set; } + + private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? IndexRoutingValue { get; set; } + + private Elastic.Clients.Elasticsearch.Indices? IndicesValue { get; set; } + + private bool? IsHiddenValue { get; set; } + + private bool? IsWriteIndexValue { get; set; } + + private bool? MustExistValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? SearchRoutingValue { get; set; } + + public AddActionDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public AddActionDescriptor Filter(QueryDsl.QueryContainerDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public AddActionDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorAction = configure; + return Self; + } + + public AddActionDescriptor Alias(Elastic.Clients.Elasticsearch.IndexAlias? alias) + { + AliasValue = alias; + return Self; + } + + public AddActionDescriptor Aliases(IEnumerable? aliases) + { + AliasesValue = aliases; + return Self; + } + + public AddActionDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + { + IndexValue = index; + return Self; + } + + public AddActionDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Routing? indexRouting) + { + IndexRoutingValue = indexRouting; + return Self; + } + + public AddActionDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + IndicesValue = indices; + return Self; + } + + public AddActionDescriptor IsHidden(bool? isHidden = true) + { + IsHiddenValue = isHidden; + return Self; + } + + public AddActionDescriptor IsWriteIndex(bool? isWriteIndex = true) + { + IsWriteIndexValue = isWriteIndex; + return Self; + } + + public AddActionDescriptor MustExist(bool? mustExist = true) + { + MustExistValue = mustExist; + return Self; + } + + public AddActionDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) + { + RoutingValue = routing; + return Self; + } + + public AddActionDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Routing? searchRouting) + { + SearchRoutingValue = searchRouting; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + + if (AliasValue is not null) + { + writer.WritePropertyName("alias"); + JsonSerializer.Serialize(writer, AliasValue, options); + } + + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + + if (IndexRoutingValue is not null) + { + writer.WritePropertyName("index_routing"); + JsonSerializer.Serialize(writer, IndexRoutingValue, options); + } + + if (IndicesValue is not null) + { + writer.WritePropertyName("indices"); + JsonSerializer.Serialize(writer, IndicesValue, options); + } + + if (IsHiddenValue.HasValue) + { + writer.WritePropertyName("is_hidden"); + writer.WriteBooleanValue(IsHiddenValue.Value); + } + + if (IsWriteIndexValue.HasValue) + { + writer.WritePropertyName("is_write_index"); + writer.WriteBooleanValue(IsWriteIndexValue.Value); + } + + if (MustExistValue.HasValue) + { + writer.WritePropertyName("must_exist"); + writer.WriteBooleanValue(MustExistValue.Value); + } + + if (RoutingValue is not null) + { + writer.WritePropertyName("routing"); + JsonSerializer.Serialize(writer, RoutingValue, options); + } + + if (SearchRoutingValue is not null) + { + writer.WritePropertyName("search_routing"); + JsonSerializer.Serialize(writer, SearchRoutingValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs new file mode 100644 index 00000000000..95212fd823c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs @@ -0,0 +1,313 @@ +// 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.IndexManagement +{ + public partial class Alias + { + [JsonInclude] + [JsonPropertyName("filter")] + public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? Filter { get; set; } + + [JsonInclude] + [JsonPropertyName("index_routing")] + public Elastic.Clients.Elasticsearch.Routing? IndexRouting { get; set; } + + [JsonInclude] + [JsonPropertyName("is_hidden")] + public bool? IsHidden { get; set; } + + [JsonInclude] + [JsonPropertyName("is_write_index")] + public bool? IsWriteIndex { get; set; } + + [JsonInclude] + [JsonPropertyName("routing")] + public Elastic.Clients.Elasticsearch.Routing? Routing { get; set; } + + [JsonInclude] + [JsonPropertyName("search_routing")] + public Elastic.Clients.Elasticsearch.Routing? SearchRouting { get; set; } + } + + public sealed partial class AliasDescriptor : DescriptorBase> + { + internal AliasDescriptor(Action> configure) => configure.Invoke(this); + public AliasDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? FilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor FilterDescriptor { get; set; } + + private Action> FilterDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? IndexRoutingValue { get; set; } + + private bool? IsHiddenValue { get; set; } + + private bool? IsWriteIndexValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? SearchRoutingValue { get; set; } + + public AliasDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public AliasDescriptor Filter(QueryDsl.QueryContainerDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public AliasDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorAction = configure; + return Self; + } + + public AliasDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Routing? indexRouting) + { + IndexRoutingValue = indexRouting; + return Self; + } + + public AliasDescriptor IsHidden(bool? isHidden = true) + { + IsHiddenValue = isHidden; + return Self; + } + + public AliasDescriptor IsWriteIndex(bool? isWriteIndex = true) + { + IsWriteIndexValue = isWriteIndex; + return Self; + } + + public AliasDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) + { + RoutingValue = routing; + return Self; + } + + public AliasDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Routing? searchRouting) + { + SearchRoutingValue = searchRouting; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + + if (IndexRoutingValue is not null) + { + writer.WritePropertyName("index_routing"); + JsonSerializer.Serialize(writer, IndexRoutingValue, options); + } + + if (IsHiddenValue.HasValue) + { + writer.WritePropertyName("is_hidden"); + writer.WriteBooleanValue(IsHiddenValue.Value); + } + + if (IsWriteIndexValue.HasValue) + { + writer.WritePropertyName("is_write_index"); + writer.WriteBooleanValue(IsWriteIndexValue.Value); + } + + if (RoutingValue is not null) + { + writer.WritePropertyName("routing"); + JsonSerializer.Serialize(writer, RoutingValue, options); + } + + if (SearchRoutingValue is not null) + { + writer.WritePropertyName("search_routing"); + JsonSerializer.Serialize(writer, SearchRoutingValue, options); + } + + writer.WriteEndObject(); + } + } + + public sealed partial class AliasDescriptor : DescriptorBase + { + internal AliasDescriptor(Action configure) => configure.Invoke(this); + public AliasDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? FilterValue { get; set; } + + private QueryDsl.QueryContainerDescriptor FilterDescriptor { get; set; } + + private Action FilterDescriptorAction { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? IndexRoutingValue { get; set; } + + private bool? IsHiddenValue { get; set; } + + private bool? IsWriteIndexValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } + + private Elastic.Clients.Elasticsearch.Routing? SearchRoutingValue { get; set; } + + public AliasDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterValue = filter; + return Self; + } + + public AliasDescriptor Filter(QueryDsl.QueryContainerDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptor = descriptor; + return Self; + } + + public AliasDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorAction = configure; + return Self; + } + + public AliasDescriptor IndexRouting(Elastic.Clients.Elasticsearch.Routing? indexRouting) + { + IndexRoutingValue = indexRouting; + return Self; + } + + public AliasDescriptor IsHidden(bool? isHidden = true) + { + IsHiddenValue = isHidden; + return Self; + } + + public AliasDescriptor IsWriteIndex(bool? isWriteIndex = true) + { + IsWriteIndexValue = isWriteIndex; + return Self; + } + + public AliasDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) + { + RoutingValue = routing; + return Self; + } + + public AliasDescriptor SearchRouting(Elastic.Clients.Elasticsearch.Routing? searchRouting) + { + SearchRoutingValue = searchRouting; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new QueryDsl.QueryContainerDescriptor(FilterDescriptorAction), options); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterValue, options); + } + + if (IndexRoutingValue is not null) + { + writer.WritePropertyName("index_routing"); + JsonSerializer.Serialize(writer, IndexRoutingValue, options); + } + + if (IsHiddenValue.HasValue) + { + writer.WritePropertyName("is_hidden"); + writer.WriteBooleanValue(IsHiddenValue.Value); + } + + if (IsWriteIndexValue.HasValue) + { + writer.WritePropertyName("is_write_index"); + writer.WriteBooleanValue(IsWriteIndexValue.Value); + } + + if (RoutingValue is not null) + { + writer.WritePropertyName("routing"); + JsonSerializer.Serialize(writer, RoutingValue, options); + } + + if (SearchRoutingValue is not null) + { + writer.WritePropertyName("search_routing"); + JsonSerializer.Serialize(writer, SearchRoutingValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseIndexResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseIndexResult.g.cs new file mode 100644 index 00000000000..341a067c2f0 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseIndexResult.g.cs @@ -0,0 +1,37 @@ +// 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.IndexManagement.Close +{ + public partial class CloseIndexResult + { + [JsonInclude] + [JsonPropertyName("closed")] + public bool Closed { get; init; } + + [JsonInclude] + [JsonPropertyName("shards")] + public Dictionary? Shards { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseShardResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseShardResult.g.cs new file mode 100644 index 00000000000..acb9b3e3e7a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CloseShardResult.g.cs @@ -0,0 +1,33 @@ +// 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.IndexManagement.Close +{ + public partial class CloseShardResult + { + [JsonInclude] + [JsonPropertyName("failures")] + public IReadOnlyCollection Failures { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItem.g.cs new file mode 100644 index 00000000000..1af4614787e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItem.g.cs @@ -0,0 +1,69 @@ +// 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.IndexManagement.GetDataStream +{ + public partial class IndicesGetDataStreamItem + { + [JsonInclude] + [JsonPropertyName("_meta")] + public Dictionary? Meta { get; init; } + + [JsonInclude] + [JsonPropertyName("generation")] + public int Generation { get; init; } + + [JsonInclude] + [JsonPropertyName("hidden")] + public bool Hidden { get; init; } + + [JsonInclude] + [JsonPropertyName("ilm_policy")] + public string? IlmPolicy { get; init; } + + [JsonInclude] + [JsonPropertyName("indices")] + public IReadOnlyCollection Indices { get; init; } + + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } + + [JsonInclude] + [JsonPropertyName("status")] + public Elastic.Clients.Elasticsearch.HealthStatus Status { get; init; } + + [JsonInclude] + [JsonPropertyName("system")] + public bool? System { get; init; } + + [JsonInclude] + [JsonPropertyName("template")] + public string Template { get; init; } + + [JsonInclude] + [JsonPropertyName("timestamp_field")] + public Elastic.Clients.Elasticsearch.IndexManagement.GetDataStream.IndicesGetDataStreamItemTimestampField TimestampField { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItemIndex.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItemIndex.g.cs new file mode 100644 index 00000000000..fcc7c9374b1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItemIndex.g.cs @@ -0,0 +1,37 @@ +// 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.IndexManagement.GetDataStream +{ + public partial class IndicesGetDataStreamItemIndex + { + [JsonInclude] + [JsonPropertyName("index_name")] + public string IndexName { get; init; } + + [JsonInclude] + [JsonPropertyName("index_uuid")] + public string IndexUuid { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItemTimestampField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItemTimestampField.g.cs new file mode 100644 index 00000000000..0504a7d3be6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesGetDataStreamItemTimestampField.g.cs @@ -0,0 +1,33 @@ +// 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.IndexManagement.GetDataStream +{ + public partial class IndicesGetDataStreamItemTimestampField + { + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs new file mode 100644 index 00000000000..1a35ae6b4d1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs @@ -0,0 +1,135 @@ +// 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.IndexManagement.UpdateAliases +{ + public partial class RemoveAction : IActionVariant + { + [JsonIgnore] + string IndexManagement.UpdateAliases.IActionVariant.ActionVariantName => "remove"; + [JsonInclude] + [JsonPropertyName("alias")] + public Elastic.Clients.Elasticsearch.IndexAlias? Alias { get; set; } + + [JsonInclude] + [JsonPropertyName("aliases")] + public IEnumerable? Aliases { get; set; } + + [JsonInclude] + [JsonPropertyName("index")] + public Elastic.Clients.Elasticsearch.IndexName? Index { get; set; } + + [JsonInclude] + [JsonPropertyName("indices")] + public Elastic.Clients.Elasticsearch.Indices? Indices { get; set; } + + [JsonInclude] + [JsonPropertyName("must_exist")] + public bool? MustExist { get; set; } + } + + public sealed partial class RemoveActionDescriptor : DescriptorBase + { + internal RemoveActionDescriptor(Action configure) => configure.Invoke(this); + public RemoveActionDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.IndexAlias? AliasValue { get; set; } + + private IEnumerable? AliasesValue { get; set; } + + private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } + + private Elastic.Clients.Elasticsearch.Indices? IndicesValue { get; set; } + + private bool? MustExistValue { get; set; } + + public RemoveActionDescriptor Alias(Elastic.Clients.Elasticsearch.IndexAlias? alias) + { + AliasValue = alias; + return Self; + } + + public RemoveActionDescriptor Aliases(IEnumerable? aliases) + { + AliasesValue = aliases; + return Self; + } + + public RemoveActionDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + { + IndexValue = index; + return Self; + } + + public RemoveActionDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + IndicesValue = indices; + return Self; + } + + public RemoveActionDescriptor MustExist(bool? mustExist = true) + { + MustExistValue = mustExist; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (AliasValue is not null) + { + writer.WritePropertyName("alias"); + JsonSerializer.Serialize(writer, AliasValue, options); + } + + if (AliasesValue is not null) + { + writer.WritePropertyName("aliases"); + JsonSerializer.Serialize(writer, AliasesValue, options); + } + + if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + + if (IndicesValue is not null) + { + writer.WritePropertyName("indices"); + JsonSerializer.Serialize(writer, IndicesValue, options); + } + + if (MustExistValue.HasValue) + { + writer.WritePropertyName("must_exist"); + writer.WriteBooleanValue(MustExistValue.Value); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs new file mode 100644 index 00000000000..b1d3559ae60 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs @@ -0,0 +1,99 @@ +// 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.IndexManagement.UpdateAliases +{ + public partial class RemoveIndexAction : IActionVariant + { + [JsonIgnore] + string IndexManagement.UpdateAliases.IActionVariant.ActionVariantName => "remove_index"; + [JsonInclude] + [JsonPropertyName("index")] + public Elastic.Clients.Elasticsearch.IndexName? Index { get; set; } + + [JsonInclude] + [JsonPropertyName("indices")] + public Elastic.Clients.Elasticsearch.Indices? Indices { get; set; } + + [JsonInclude] + [JsonPropertyName("must_exist")] + public bool? MustExist { get; set; } + } + + public sealed partial class RemoveIndexActionDescriptor : DescriptorBase + { + internal RemoveIndexActionDescriptor(Action configure) => configure.Invoke(this); + public RemoveIndexActionDescriptor() : base() + { + } + + private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } + + private Elastic.Clients.Elasticsearch.Indices? IndicesValue { get; set; } + + private bool? MustExistValue { get; set; } + + public RemoveIndexActionDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) + { + IndexValue = index; + return Self; + } + + public RemoveIndexActionDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? indices) + { + IndicesValue = indices; + return Self; + } + + public RemoveIndexActionDescriptor MustExist(bool? mustExist = true) + { + MustExistValue = mustExist; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (IndexValue is not null) + { + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + } + + if (IndicesValue is not null) + { + writer.WritePropertyName("indices"); + JsonSerializer.Serialize(writer, IndicesValue, options); + } + + if (MustExistValue.HasValue) + { + writer.WritePropertyName("must_exist"); + writer.WriteBooleanValue(MustExistValue.Value); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file