diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs index 71faa07b92e..7dc66b5f77f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs @@ -66,6 +66,10 @@ internal static class ApiUrlsLookups internal static ApiUrls NodesUsage = new ApiUrls(new[] { "/_nodes/usage", "/_nodes/{node_id}/usage", "/_nodes/usage/{metric}", "/_nodes/{node_id}/usage/{metric}" }); internal static ApiUrls NoNamespaceOpenPointInTime = new ApiUrls(new[] { "/{index}/_pit" }); internal static ApiUrls NoNamespacePing = new ApiUrls(new[] { "/" }); + internal static ApiUrls SearchableSnapshotsCacheStats = new ApiUrls(new[] { "/_searchable_snapshots/cache/stats", "/_searchable_snapshots/{node_id}/cache/stats" }); + internal static ApiUrls SearchableSnapshotsClearCache = new ApiUrls(new[] { "/_searchable_snapshots/cache/clear", "/{index}/_searchable_snapshots/cache/clear" }); + internal static ApiUrls SearchableSnapshotsMount = new ApiUrls(new[] { "/_snapshot/{repository}/{snapshot}/_mount" }); + internal static ApiUrls SearchableSnapshotsStats = new ApiUrls(new[] { "/_searchable_snapshots/stats", "/{index}/_searchable_snapshots/stats" }); internal static ApiUrls NoNamespaceSearch = new ApiUrls(new[] { "/_search", "/{index}/_search" }); internal static ApiUrls NoNamespaceGetSource = new ApiUrls(new[] { "/{index}/_source/{id}" }); internal static ApiUrls SqlClearCursor = new ApiUrls(new[] { "/_sql/close" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsCacheStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsCacheStatsRequest.g.cs new file mode 100644 index 00000000000..1b0e1185c8f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsCacheStatsRequest.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.SearchableSnapshots +{ + public class SearchableSnapshotsCacheStatsRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + } + + public partial class SearchableSnapshotsCacheStatsRequest : PlainRequestBase + { + public SearchableSnapshotsCacheStatsRequest() + { + } + + public SearchableSnapshotsCacheStatsRequest(Elastic.Clients.Elasticsearch.NodeIds? node_id) : base(r => r.Optional("node_id", node_id)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsCacheStats; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + } + + public sealed partial class SearchableSnapshotsCacheStatsRequestDescriptor : RequestDescriptorBase + { + internal SearchableSnapshotsCacheStatsRequestDescriptor(Action configure) => configure.Invoke(this); + public SearchableSnapshotsCacheStatsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsCacheStats; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + public SearchableSnapshotsCacheStatsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public SearchableSnapshotsCacheStatsRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.NodeIds? node_id) + { + RouteValues.Optional("node_id", node_id); + 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/SearchableSnapshots/SearchableSnapshotsCacheStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsCacheStatsResponse.g.cs new file mode 100644 index 00000000000..8682d261031 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsCacheStatsResponse.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.SearchableSnapshots +{ + public partial class SearchableSnapshotsCacheStatsResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("nodes")] + public Dictionary Nodes { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsClearCacheRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsClearCacheRequest.g.cs new file mode 100644 index 00000000000..80eaf89c8d5 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsClearCacheRequest.g.cs @@ -0,0 +1,110 @@ +// 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.SearchableSnapshots +{ + public class SearchableSnapshotsClearCacheRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + } + + public partial class SearchableSnapshotsClearCacheRequest : PlainRequestBase + { + public SearchableSnapshotsClearCacheRequest() + { + } + + public SearchableSnapshotsClearCacheRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsClearCache; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.ExpandWildcards? ExpandWildcards { get => Q("expand_wildcards"); set => Q("expand_wildcards", value); } + + [JsonIgnore] + public bool? AllowNoIndices { get => Q("allow_no_indices"); set => Q("allow_no_indices", value); } + + [JsonIgnore] + public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + } + + public sealed partial class SearchableSnapshotsClearCacheRequestDescriptor : RequestDescriptorBase, SearchableSnapshotsClearCacheRequestParameters> + { + internal SearchableSnapshotsClearCacheRequestDescriptor(Action> configure) => configure.Invoke(this); + public SearchableSnapshotsClearCacheRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsClearCache; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public SearchableSnapshotsClearCacheRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public SearchableSnapshotsClearCacheRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public SearchableSnapshotsClearCacheRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public SearchableSnapshotsClearCacheRequestDescriptor 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 SearchableSnapshotsClearCacheRequestDescriptor : RequestDescriptorBase + { + internal SearchableSnapshotsClearCacheRequestDescriptor(Action configure) => configure.Invoke(this); + public SearchableSnapshotsClearCacheRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsClearCache; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => false; + public SearchableSnapshotsClearCacheRequestDescriptor AllowNoIndices(bool? allowNoIndices = true) => Qs("allow_no_indices", allowNoIndices); + public SearchableSnapshotsClearCacheRequestDescriptor ExpandWildcards(Elastic.Clients.Elasticsearch.ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public SearchableSnapshotsClearCacheRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); + public SearchableSnapshotsClearCacheRequestDescriptor 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/SearchableSnapshots/SearchableSnapshotsClearCacheResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsClearCacheResponse.g.cs new file mode 100644 index 00000000000..0693befc249 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsClearCacheResponse.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.SearchableSnapshots +{ + public partial class SearchableSnapshotsClearCacheResponse : ElasticsearchResponseBase + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsMountRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsMountRequest.g.cs new file mode 100644 index 00000000000..5d4ad35692f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsMountRequest.g.cs @@ -0,0 +1,162 @@ +// 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.SearchableSnapshots +{ + public class SearchableSnapshotsMountRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + [JsonIgnore] + public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } + + [JsonIgnore] + public string? Storage { get => Q("storage"); set => Q("storage", value); } + } + + public partial class SearchableSnapshotsMountRequest : PlainRequestBase + { + public SearchableSnapshotsMountRequest(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsMount; + 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 bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } + + [JsonIgnore] + public string? Storage { get => Q("storage"); set => Q("storage", value); } + + [JsonInclude] + [JsonPropertyName("index")] + public Elastic.Clients.Elasticsearch.IndexName Index { get; set; } + + [JsonInclude] + [JsonPropertyName("renamed_index")] + public Elastic.Clients.Elasticsearch.IndexName? RenamedIndex { get; set; } + + [JsonInclude] + [JsonPropertyName("index_settings")] + public Dictionary? IndexSettings { get; set; } + + [JsonInclude] + [JsonPropertyName("ignore_index_settings")] + public IEnumerable? IgnoreIndexSettings { get; set; } + } + + public sealed partial class SearchableSnapshotsMountRequestDescriptor : RequestDescriptorBase + { + internal SearchableSnapshotsMountRequestDescriptor(Action configure) => configure.Invoke(this); + public SearchableSnapshotsMountRequestDescriptor(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot)) + { + } + + internal SearchableSnapshotsMountRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsMount; + protected override HttpMethod HttpMethod => HttpMethod.POST; + protected override bool SupportsBody => true; + public SearchableSnapshotsMountRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout); + public SearchableSnapshotsMountRequestDescriptor Storage(string? storage) => Qs("storage", storage); + public SearchableSnapshotsMountRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); + public SearchableSnapshotsMountRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Name repository) + { + RouteValues.Required("repository", repository); + return Self; + } + + public SearchableSnapshotsMountRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Name snapshot) + { + RouteValues.Required("snapshot", snapshot); + return Self; + } + + private IEnumerable? IgnoreIndexSettingsValue { get; set; } + + private Elastic.Clients.Elasticsearch.IndexName IndexValue { get; set; } + + private Dictionary? IndexSettingsValue { get; set; } + + private Elastic.Clients.Elasticsearch.IndexName? RenamedIndexValue { get; set; } + + public SearchableSnapshotsMountRequestDescriptor IgnoreIndexSettings(IEnumerable? ignoreIndexSettings) + { + IgnoreIndexSettingsValue = ignoreIndexSettings; + return Self; + } + + public SearchableSnapshotsMountRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) + { + IndexValue = index; + return Self; + } + + public SearchableSnapshotsMountRequestDescriptor IndexSettings(Func, FluentDictionary> selector) + { + IndexSettingsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + public SearchableSnapshotsMountRequestDescriptor RenamedIndex(Elastic.Clients.Elasticsearch.IndexName? renamedIndex) + { + RenamedIndexValue = renamedIndex; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (IgnoreIndexSettingsValue is not null) + { + writer.WritePropertyName("ignore_index_settings"); + JsonSerializer.Serialize(writer, IgnoreIndexSettingsValue, options); + } + + writer.WritePropertyName("index"); + JsonSerializer.Serialize(writer, IndexValue, options); + if (IndexSettingsValue is not null) + { + writer.WritePropertyName("index_settings"); + JsonSerializer.Serialize(writer, IndexSettingsValue, options); + } + + if (RenamedIndexValue is not null) + { + writer.WritePropertyName("renamed_index"); + JsonSerializer.Serialize(writer, RenamedIndexValue, options); + } + + writer.WriteEndObject(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsMountResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsMountResponse.g.cs new file mode 100644 index 00000000000..d057a545ee0 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsMountResponse.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.SearchableSnapshots +{ + public partial class SearchableSnapshotsMountResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("snapshot")] + public Elastic.Clients.Elasticsearch.SearchableSnapshots.Mount.MountedSnapshot Snapshot { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsStatsRequest.g.cs new file mode 100644 index 00000000000..073035e92d1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsStatsRequest.g.cs @@ -0,0 +1,94 @@ +// 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.SearchableSnapshots +{ + public class SearchableSnapshotsStatsRequestParameters : RequestParameters + { + [JsonIgnore] + public Elastic.Clients.Elasticsearch.SearchableSnapshots.StatsLevel? Level { get => Q("level"); set => Q("level", value); } + } + + public partial class SearchableSnapshotsStatsRequest : PlainRequestBase + { + public SearchableSnapshotsStatsRequest() + { + } + + public SearchableSnapshotsStatsRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => r.Optional("index", indices)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsStats; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + [JsonIgnore] + public Elastic.Clients.Elasticsearch.SearchableSnapshots.StatsLevel? Level { get => Q("level"); set => Q("level", value); } + } + + public sealed partial class SearchableSnapshotsStatsRequestDescriptor : RequestDescriptorBase, SearchableSnapshotsStatsRequestParameters> + { + internal SearchableSnapshotsStatsRequestDescriptor(Action> configure) => configure.Invoke(this); + public SearchableSnapshotsStatsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsStats; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + public SearchableSnapshotsStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.SearchableSnapshots.StatsLevel? level) => Qs("level", level); + public SearchableSnapshotsStatsRequestDescriptor 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 SearchableSnapshotsStatsRequestDescriptor : RequestDescriptorBase + { + internal SearchableSnapshotsStatsRequestDescriptor(Action configure) => configure.Invoke(this); + public SearchableSnapshotsStatsRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlsLookups.SearchableSnapshotsStats; + protected override HttpMethod HttpMethod => HttpMethod.GET; + protected override bool SupportsBody => false; + public SearchableSnapshotsStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.SearchableSnapshots.StatsLevel? level) => Qs("level", level); + public SearchableSnapshotsStatsRequestDescriptor 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/SearchableSnapshots/SearchableSnapshotsStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsStatsResponse.g.cs new file mode 100644 index 00000000000..084492270d1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/SearchableSnapshotsStatsResponse.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.SearchableSnapshots +{ + public partial class SearchableSnapshotsStatsResponse : ElasticsearchResponseBase + { + [JsonInclude] + [JsonPropertyName("stats")] + public object Stats { get; init; } + + [JsonInclude] + [JsonPropertyName("total")] + public object Total { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchableSnapshots.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchableSnapshots.g.cs new file mode 100644 index 00000000000..83785282b7e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchableSnapshots.g.cs @@ -0,0 +1,143 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Threading; +using System.Threading.Tasks; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.SearchableSnapshots +{ + public class SearchableSnapshotsNamespace : NamespacedClientProxy + { + internal SearchableSnapshotsNamespace(ElasticsearchClient client) : base(client) + { + } + + public SearchableSnapshotsCacheStatsResponse CacheStats(SearchableSnapshotsCacheStatsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task CacheStatsAsync(SearchableSnapshotsCacheStatsRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SearchableSnapshotsCacheStatsResponse CacheStats(Action configureRequest = null) + { + var descriptor = new SearchableSnapshotsCacheStatsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task CacheStatsAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SearchableSnapshotsCacheStatsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SearchableSnapshotsClearCacheResponse ClearCache(SearchableSnapshotsClearCacheRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task ClearCacheAsync(SearchableSnapshotsClearCacheRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SearchableSnapshotsClearCacheResponse ClearCache(Action configureRequest = null) + { + var descriptor = new SearchableSnapshotsClearCacheRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task ClearCacheAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SearchableSnapshotsClearCacheRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SearchableSnapshotsMountResponse Mount(SearchableSnapshotsMountRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task MountAsync(SearchableSnapshotsMountRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SearchableSnapshotsMountResponse Mount(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest = null) + { + var descriptor = new SearchableSnapshotsMountRequestDescriptor(repository, snapshot); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task MountAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SearchableSnapshotsMountRequestDescriptor(repository, snapshot); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + + public SearchableSnapshotsStatsResponse Stats(SearchableSnapshotsStatsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public Task StatsAsync(SearchableSnapshotsStatsRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public SearchableSnapshotsStatsResponse Stats(Action configureRequest = null) + { + var descriptor = new SearchableSnapshotsStatsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequest(descriptor); + } + + public Task StatsAsync(Action configureRequest = null, CancellationToken cancellationToken = default) + { + var descriptor = new SearchableSnapshotsStatsRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs index 833f70fd745..64fbf8b7fe7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -23,6 +23,7 @@ using Elastic.Clients.Elasticsearch.Ilm; using Elastic.Clients.Elasticsearch.IndexManagement; using Elastic.Clients.Elasticsearch.Nodes; +using Elastic.Clients.Elasticsearch.SearchableSnapshots; using Elastic.Clients.Elasticsearch.Sql; using Elastic.Clients.Elasticsearch.Tasks; using System; @@ -50,6 +51,8 @@ public partial class ElasticsearchClient public NodesNamespace Nodes { get; private set; } + public SearchableSnapshotsNamespace SearchableSnapshots { get; private set; } + public SqlNamespace Sql { get; private set; } public TasksNamespace Tasks { get; private set; } @@ -64,6 +67,7 @@ private partial void SetupNamespaces() Ilm = new IlmNamespace(this); IndexManagement = new IndexManagementNamespace(this); Nodes = new NodesNamespace(this); + SearchableSnapshots = new SearchableSnapshotsNamespace(this); Sql = new SqlNamespace(this); Tasks = new TasksNamespace(this); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.SearchableSnapshots.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.SearchableSnapshots.g.cs new file mode 100644 index 00000000000..b6dfa4d337b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.SearchableSnapshots.g.cs @@ -0,0 +1,75 @@ +// 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.Text.Json; +using System.Text.Json.Serialization; +using System.Runtime.Serialization; +using Elastic.Transport; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.SearchableSnapshots +{ + [JsonConverter(typeof(StatsLevelConverter))] + public enum StatsLevel + { + [EnumMember(Value = "shards")] + Shards, + [EnumMember(Value = "indices")] + Indices, + [EnumMember(Value = "cluster")] + Cluster + } + + internal sealed class StatsLevelConverter : JsonConverter + { + public override StatsLevel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "shards": + return StatsLevel.Shards; + case "indices": + return StatsLevel.Indices; + case "cluster": + return StatsLevel.Cluster; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, StatsLevel value, JsonSerializerOptions options) + { + switch (value) + { + case StatsLevel.Shards: + writer.WriteStringValue("shards"); + return; + case StatsLevel.Indices: + writer.WriteStringValue("indices"); + return; + case StatsLevel.Cluster: + writer.WriteStringValue("cluster"); + return; + } + + writer.WriteNullValue(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchableSnapshots/MountedSnapshot.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchableSnapshots/MountedSnapshot.g.cs new file mode 100644 index 00000000000..ab7b147c3e9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchableSnapshots/MountedSnapshot.g.cs @@ -0,0 +1,41 @@ +// 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.SearchableSnapshots.Mount +{ + public partial class MountedSnapshot + { + [JsonInclude] + [JsonPropertyName("indices")] + public Elastic.Clients.Elasticsearch.Indices Indices { get; init; } + + [JsonInclude] + [JsonPropertyName("shards")] + public Elastic.Clients.Elasticsearch.ShardStatistics Shards { get; init; } + + [JsonInclude] + [JsonPropertyName("snapshot")] + public string Snapshot { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchableSnapshots/Node.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchableSnapshots/Node.g.cs new file mode 100644 index 00000000000..8e2b065d033 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchableSnapshots/Node.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.SearchableSnapshots.CacheStats +{ + public partial class Node + { + [JsonInclude] + [JsonPropertyName("shared_cache")] + public Elastic.Clients.Elasticsearch.SearchableSnapshots.CacheStats.Shared SharedCache { get; init; } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchableSnapshots/Shared.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchableSnapshots/Shared.g.cs new file mode 100644 index 00000000000..9a33d85ab47 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchableSnapshots/Shared.g.cs @@ -0,0 +1,61 @@ +// 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.SearchableSnapshots.CacheStats +{ + public partial class Shared + { + [JsonInclude] + [JsonPropertyName("bytes_read_in_bytes")] + public Elastic.Clients.Elasticsearch.ByteSize BytesReadInBytes { get; init; } + + [JsonInclude] + [JsonPropertyName("bytes_written_in_bytes")] + public Elastic.Clients.Elasticsearch.ByteSize BytesWrittenInBytes { get; init; } + + [JsonInclude] + [JsonPropertyName("evictions")] + public long Evictions { get; init; } + + [JsonInclude] + [JsonPropertyName("num_regions")] + public int NumRegions { get; init; } + + [JsonInclude] + [JsonPropertyName("reads")] + public long Reads { get; init; } + + [JsonInclude] + [JsonPropertyName("region_size_in_bytes")] + public Elastic.Clients.Elasticsearch.ByteSize RegionSizeInBytes { get; init; } + + [JsonInclude] + [JsonPropertyName("size_in_bytes")] + public Elastic.Clients.Elasticsearch.ByteSize SizeInBytes { get; init; } + + [JsonInclude] + [JsonPropertyName("writes")] + public long Writes { get; init; } + } +} \ No newline at end of file