diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs
index 5384356e45..a95353e610 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/ApiUrlLookup.g.cs
@@ -78,7 +78,6 @@ internal static class ApiUrlLookup
internal static ApiUrls IndexManagementPutIndexTemplate = new ApiUrls(new[] { "_index_template/{name}" });
internal static ApiUrls IndexManagementPutMapping = new ApiUrls(new[] { "{index}/_mapping" });
internal static ApiUrls IndexManagementPutSettings = new ApiUrls(new[] { "_settings", "{index}/_settings" });
- internal static ApiUrls IndexManagementPutTemplate = new ApiUrls(new[] { "_template/{name}" });
internal static ApiUrls IndexManagementRecovery = new ApiUrls(new[] { "_recovery", "{index}/_recovery" });
internal static ApiUrls IndexManagementRefresh = new ApiUrls(new[] { "_refresh", "{index}/_refresh" });
internal static ApiUrls IndexManagementResolveIndex = new ApiUrls(new[] { "_resolve/index/{name}" });
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsRequest.g.cs
index f3ac2f6392..90fdb724cd 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsRequest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/ClusterStatsRequest.g.cs
@@ -33,10 +33,10 @@ public sealed partial class ClusterStatsRequestParameters : RequestParameters
{
///
///
- /// If true, returns settings in flat format.
+ /// Include remote cluster data into the response
///
///
- public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); }
+ public bool? IncludeRemotes { get => Q("include_remotes"); set => Q("include_remotes", value); }
///
///
@@ -74,11 +74,11 @@ public ClusterStatsRequest(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nod
///
///
- /// If true, returns settings in flat format.
+ /// Include remote cluster data into the response
///
///
[JsonIgnore]
- public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); }
+ public bool? IncludeRemotes { get => Q("include_remotes"); set => Q("include_remotes", value); }
///
///
@@ -117,7 +117,7 @@ public ClusterStatsRequestDescriptor()
internal override string OperationName => "cluster.stats";
- public ClusterStatsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings);
+ public ClusterStatsRequestDescriptor IncludeRemotes(bool? includeRemotes = true) => Qs("include_remotes", includeRemotes);
public ClusterStatsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout);
public ClusterStatsRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.Serverless.NodeIds? nodeId)
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheResponse.g.cs
index e81d3e2bfd..17ef061beb 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ClearCacheResponse.g.cs
@@ -29,5 +29,5 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;
public sealed partial class ClearCacheResponse : ElasticsearchResponse
{
[JsonInclude, JsonPropertyName("_shards")]
- public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; }
+ public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushResponse.g.cs
index cd69079691..687c6c94df 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/FlushResponse.g.cs
@@ -29,5 +29,5 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;
public sealed partial class FlushResponse : ElasticsearchResponse
{
[JsonInclude, JsonPropertyName("_shards")]
- public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; }
+ public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeResponse.g.cs
index c2c25ee1c0..a26e677edd 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/ForcemergeResponse.g.cs
@@ -29,7 +29,7 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;
public sealed partial class ForcemergeResponse : ElasticsearchResponse
{
[JsonInclude, JsonPropertyName("_shards")]
- public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; }
+ public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; }
///
///
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs
deleted file mode 100644
index f1bc42f7db..0000000000
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs
+++ /dev/null
@@ -1,577 +0,0 @@
-// 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.
-//
-// ------------------------------------------------
-
-#nullable restore
-
-using Elastic.Clients.Elasticsearch.Serverless.Fluent;
-using Elastic.Clients.Elasticsearch.Serverless.Requests;
-using Elastic.Clients.Elasticsearch.Serverless.Serialization;
-using Elastic.Transport;
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Text.Json;
-using System.Text.Json.Serialization;
-
-namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;
-
-public sealed partial class PutTemplateRequestParameters : RequestParameters
-{
- public string? Cause { get => Q("cause"); set => Q("cause", value); }
-
- ///
- ///
- /// If true, this request cannot replace or update existing index templates.
- ///
- ///
- public bool? Create { get => Q("create"); set => Q("create", value); }
-
- ///
- ///
- /// Period to wait for a connection to the master node. If no response is
- /// received before the timeout expires, the request fails and returns an error.
- ///
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
-}
-
-///
-///
-/// Create or update an index template.
-/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
-///
-///
-public sealed partial class PutTemplateRequest : PlainRequest
-{
- public PutTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name))
- {
- }
-
- internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutTemplate;
-
- protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
-
- internal override bool SupportsBody => true;
-
- internal override string OperationName => "indices.put_template";
-
- [JsonIgnore]
- public string? Cause { get => Q("cause"); set => Q("cause", value); }
-
- ///
- ///
- /// If true, this request cannot replace or update existing index templates.
- ///
- ///
- [JsonIgnore]
- public bool? Create { get => Q("create"); set => Q("create", value); }
-
- ///
- ///
- /// Period to wait for a connection to the master node. If no response is
- /// received before the timeout expires, the request fails and returns an error.
- ///
- ///
- [JsonIgnore]
- public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); }
-
- ///
- ///
- /// Aliases for the index.
- ///
- ///
- [JsonInclude, JsonPropertyName("aliases")]
- public IDictionary? Aliases { get; set; }
-
- ///
- ///
- /// Array of wildcard expressions used to match the names
- /// of indices during creation.
- ///
- ///
- [JsonInclude, JsonPropertyName("index_patterns")]
- [SingleOrManyCollectionConverter(typeof(string))]
- public ICollection? IndexPatterns { get; set; }
-
- ///
- ///
- /// Mapping for fields in the index.
- ///
- ///
- [JsonInclude, JsonPropertyName("mappings")]
- public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Mappings { get; set; }
-
- ///
- ///
- /// Order in which Elasticsearch applies this template if index
- /// matches multiple templates.
- ///
- ///
- /// Templates with lower 'order' values are merged first. Templates with higher
- /// 'order' values are merged later, overriding templates with lower values.
- ///
- ///
- [JsonInclude, JsonPropertyName("order")]
- public int? Order { get; set; }
-
- ///
- ///
- /// Configuration options for the index.
- ///
- ///
- [JsonInclude, JsonPropertyName("settings")]
- public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; set; }
-
- ///
- ///
- /// Version number used to manage index templates externally. This number
- /// is not automatically generated by Elasticsearch.
- ///
- ///
- [JsonInclude, JsonPropertyName("version")]
- public long? Version { get; set; }
-}
-
-///
-///
-/// Create or update an index template.
-/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
-///
-///
-public sealed partial class PutTemplateRequestDescriptor : RequestDescriptor, PutTemplateRequestParameters>
-{
- internal PutTemplateRequestDescriptor(Action> configure) => configure.Invoke(this);
-
- public PutTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name))
- {
- }
-
- internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutTemplate;
-
- protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
-
- internal override bool SupportsBody => true;
-
- internal override string OperationName => "indices.put_template";
-
- public PutTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause);
- public PutTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create);
- public PutTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
-
- public PutTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name)
- {
- RouteValues.Required("name", name);
- return Self;
- }
-
- private IDictionary> AliasesValue { get; set; }
- private ICollection? IndexPatternsValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; }
- private Action> MappingsDescriptorAction { get; set; }
- private int? OrderValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; }
- private Action> SettingsDescriptorAction { get; set; }
- private long? VersionValue { get; set; }
-
- ///
- ///
- /// Aliases for the index.
- ///
- ///
- public PutTemplateRequestDescriptor Aliases(Func>, FluentDescriptorDictionary>> selector)
- {
- AliasesValue = selector?.Invoke(new FluentDescriptorDictionary>());
- return Self;
- }
-
- ///
- ///
- /// Array of wildcard expressions used to match the names
- /// of indices during creation.
- ///
- ///
- public PutTemplateRequestDescriptor IndexPatterns(ICollection? indexPatterns)
- {
- IndexPatternsValue = indexPatterns;
- return Self;
- }
-
- ///
- ///
- /// Mapping for fields in the index.
- ///
- ///
- public PutTemplateRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings)
- {
- MappingsDescriptor = null;
- MappingsDescriptorAction = null;
- MappingsValue = mappings;
- return Self;
- }
-
- public PutTemplateRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor)
- {
- MappingsValue = null;
- MappingsDescriptorAction = null;
- MappingsDescriptor = descriptor;
- return Self;
- }
-
- public PutTemplateRequestDescriptor Mappings(Action> configure)
- {
- MappingsValue = null;
- MappingsDescriptor = null;
- MappingsDescriptorAction = configure;
- return Self;
- }
-
- ///
- ///
- /// Order in which Elasticsearch applies this template if index
- /// matches multiple templates.
- ///
- ///
- /// Templates with lower 'order' values are merged first. Templates with higher
- /// 'order' values are merged later, overriding templates with lower values.
- ///
- ///
- public PutTemplateRequestDescriptor Order(int? order)
- {
- OrderValue = order;
- return Self;
- }
-
- ///
- ///
- /// Configuration options for the index.
- ///
- ///
- public PutTemplateRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings)
- {
- SettingsDescriptor = null;
- SettingsDescriptorAction = null;
- SettingsValue = settings;
- return Self;
- }
-
- public PutTemplateRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor)
- {
- SettingsValue = null;
- SettingsDescriptorAction = null;
- SettingsDescriptor = descriptor;
- return Self;
- }
-
- public PutTemplateRequestDescriptor Settings(Action> configure)
- {
- SettingsValue = null;
- SettingsDescriptor = null;
- SettingsDescriptorAction = configure;
- return Self;
- }
-
- ///
- ///
- /// Version number used to manage index templates externally. This number
- /// is not automatically generated by Elasticsearch.
- ///
- ///
- public PutTemplateRequestDescriptor Version(long? version)
- {
- VersionValue = version;
- 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 (IndexPatternsValue is not null)
- {
- writer.WritePropertyName("index_patterns");
- SingleOrManySerializationHelper.Serialize(IndexPatternsValue, writer, options);
- }
-
- if (MappingsDescriptor is not null)
- {
- writer.WritePropertyName("mappings");
- JsonSerializer.Serialize(writer, MappingsDescriptor, options);
- }
- else if (MappingsDescriptorAction is not null)
- {
- writer.WritePropertyName("mappings");
- JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options);
- }
- else if (MappingsValue is not null)
- {
- writer.WritePropertyName("mappings");
- JsonSerializer.Serialize(writer, MappingsValue, options);
- }
-
- if (OrderValue.HasValue)
- {
- writer.WritePropertyName("order");
- writer.WriteNumberValue(OrderValue.Value);
- }
-
- if (SettingsDescriptor is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, SettingsDescriptor, options);
- }
- else if (SettingsDescriptorAction is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options);
- }
- else if (SettingsValue is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, SettingsValue, options);
- }
-
- if (VersionValue.HasValue)
- {
- writer.WritePropertyName("version");
- writer.WriteNumberValue(VersionValue.Value);
- }
-
- writer.WriteEndObject();
- }
-}
-
-///
-///
-/// Create or update an index template.
-/// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
-///
-///
-public sealed partial class PutTemplateRequestDescriptor : RequestDescriptor
-{
- internal PutTemplateRequestDescriptor(Action configure) => configure.Invoke(this);
-
- public PutTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name))
- {
- }
-
- internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementPutTemplate;
-
- protected override HttpMethod StaticHttpMethod => HttpMethod.PUT;
-
- internal override bool SupportsBody => true;
-
- internal override string OperationName => "indices.put_template";
-
- public PutTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause);
- public PutTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create);
- public PutTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
-
- public PutTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name)
- {
- RouteValues.Required("name", name);
- return Self;
- }
-
- private IDictionary AliasesValue { get; set; }
- private ICollection? IndexPatternsValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? MappingsValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; }
- private Action MappingsDescriptorAction { get; set; }
- private int? OrderValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; }
- private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; }
- private Action SettingsDescriptorAction { get; set; }
- private long? VersionValue { get; set; }
-
- ///
- ///
- /// Aliases for the index.
- ///
- ///
- public PutTemplateRequestDescriptor Aliases(Func, FluentDescriptorDictionary> selector)
- {
- AliasesValue = selector?.Invoke(new FluentDescriptorDictionary());
- return Self;
- }
-
- ///
- ///
- /// Array of wildcard expressions used to match the names
- /// of indices during creation.
- ///
- ///
- public PutTemplateRequestDescriptor IndexPatterns(ICollection? indexPatterns)
- {
- IndexPatternsValue = indexPatterns;
- return Self;
- }
-
- ///
- ///
- /// Mapping for fields in the index.
- ///
- ///
- public PutTemplateRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings)
- {
- MappingsDescriptor = null;
- MappingsDescriptorAction = null;
- MappingsValue = mappings;
- return Self;
- }
-
- public PutTemplateRequestDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor)
- {
- MappingsValue = null;
- MappingsDescriptorAction = null;
- MappingsDescriptor = descriptor;
- return Self;
- }
-
- public PutTemplateRequestDescriptor Mappings(Action configure)
- {
- MappingsValue = null;
- MappingsDescriptor = null;
- MappingsDescriptorAction = configure;
- return Self;
- }
-
- ///
- ///
- /// Order in which Elasticsearch applies this template if index
- /// matches multiple templates.
- ///
- ///
- /// Templates with lower 'order' values are merged first. Templates with higher
- /// 'order' values are merged later, overriding templates with lower values.
- ///
- ///
- public PutTemplateRequestDescriptor Order(int? order)
- {
- OrderValue = order;
- return Self;
- }
-
- ///
- ///
- /// Configuration options for the index.
- ///
- ///
- public PutTemplateRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings)
- {
- SettingsDescriptor = null;
- SettingsDescriptorAction = null;
- SettingsValue = settings;
- return Self;
- }
-
- public PutTemplateRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor)
- {
- SettingsValue = null;
- SettingsDescriptorAction = null;
- SettingsDescriptor = descriptor;
- return Self;
- }
-
- public PutTemplateRequestDescriptor Settings(Action configure)
- {
- SettingsValue = null;
- SettingsDescriptor = null;
- SettingsDescriptorAction = configure;
- return Self;
- }
-
- ///
- ///
- /// Version number used to manage index templates externally. This number
- /// is not automatically generated by Elasticsearch.
- ///
- ///
- public PutTemplateRequestDescriptor Version(long? version)
- {
- VersionValue = version;
- 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 (IndexPatternsValue is not null)
- {
- writer.WritePropertyName("index_patterns");
- SingleOrManySerializationHelper.Serialize(IndexPatternsValue, writer, options);
- }
-
- if (MappingsDescriptor is not null)
- {
- writer.WritePropertyName("mappings");
- JsonSerializer.Serialize(writer, MappingsDescriptor, options);
- }
- else if (MappingsDescriptorAction is not null)
- {
- writer.WritePropertyName("mappings");
- JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options);
- }
- else if (MappingsValue is not null)
- {
- writer.WritePropertyName("mappings");
- JsonSerializer.Serialize(writer, MappingsValue, options);
- }
-
- if (OrderValue.HasValue)
- {
- writer.WritePropertyName("order");
- writer.WriteNumberValue(OrderValue.Value);
- }
-
- if (SettingsDescriptor is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, SettingsDescriptor, options);
- }
- else if (SettingsDescriptorAction is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options);
- }
- else if (SettingsValue is not null)
- {
- writer.WritePropertyName("settings");
- JsonSerializer.Serialize(writer, SettingsValue, options);
- }
-
- if (VersionValue.HasValue)
- {
- writer.WritePropertyName("version");
- writer.WriteNumberValue(VersionValue.Value);
- }
-
- writer.WriteEndObject();
- }
-}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshResponse.g.cs
index 179549b48e..52956bca56 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/RefreshResponse.g.cs
@@ -29,5 +29,5 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;
public sealed partial class RefreshResponse : ElasticsearchResponse
{
[JsonInclude, JsonPropertyName("_shards")]
- public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; }
+ public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics? Shards { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs
index 36890a6be5..f8523f5be5 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Security/GetBuiltinPrivilegesResponse.g.cs
@@ -31,6 +31,5 @@ public sealed partial class GetBuiltinPrivilegesResponse : ElasticsearchResponse
[JsonInclude, JsonPropertyName("cluster")]
public IReadOnlyCollection Cluster { get; init; }
[JsonInclude, JsonPropertyName("index")]
- [SingleOrManyCollectionConverter(typeof(string))]
- public IReadOnlyCollection Indices { get; init; }
+ public IReadOnlyCollection Index { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreResponse.g.cs
index aa37bbc1b0..0ee5b1548b 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Snapshot/RestoreResponse.g.cs
@@ -28,6 +28,8 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Snapshot;
public sealed partial class RestoreResponse : ElasticsearchResponse
{
+ [JsonInclude, JsonPropertyName("accepted")]
+ public bool? Accepted { get; init; }
[JsonInclude, JsonPropertyName("snapshot")]
- public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SnapshotRestore Snapshot { get; init; }
+ public Elastic.Clients.Elasticsearch.Serverless.Snapshot.SnapshotRestore? Snapshot { get; init; }
}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs
index 5d44684be7..7b6acfce7a 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Indices.g.cs
@@ -3600,103 +3600,6 @@ public virtual Task PutSettingsAsync(Elastic.Clients
return DoRequestAsync(descriptor, cancellationToken);
}
- ///
- ///
- /// Create or update an index template.
- /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
- ///
- /// Learn more about this API in the Elasticsearch documentation.
- ///
- public virtual Task PutTemplateAsync(PutTemplateRequest request, CancellationToken cancellationToken = default)
- {
- request.BeforeRequest();
- return DoRequestAsync(request, cancellationToken);
- }
-
- ///
- ///
- /// Create or update an index template.
- /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
- ///
- /// Learn more about this API in the Elasticsearch documentation.
- ///
- public virtual Task PutTemplateAsync(PutTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default)
- {
- descriptor.BeforeRequest();
- return DoRequestAsync, PutTemplateResponse, PutTemplateRequestParameters>(descriptor, cancellationToken);
- }
-
- ///
- ///
- /// Create or update an index template.
- /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
- ///
- /// Learn more about this API in the Elasticsearch documentation.
- ///
- public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default)
- {
- var descriptor = new PutTemplateRequestDescriptor(name);
- descriptor.BeforeRequest();
- return DoRequestAsync, PutTemplateResponse, PutTemplateRequestParameters>(descriptor, cancellationToken);
- }
-
- ///
- ///
- /// Create or update an index template.
- /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
- ///
- /// Learn more about this API in the Elasticsearch documentation.
- ///
- public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default)
- {
- var descriptor = new PutTemplateRequestDescriptor(name);
- configureRequest?.Invoke(descriptor);
- descriptor.BeforeRequest();
- return DoRequestAsync, PutTemplateResponse, PutTemplateRequestParameters>(descriptor, cancellationToken);
- }
-
- ///
- ///
- /// Create or update an index template.
- /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
- ///
- /// Learn more about this API in the Elasticsearch documentation.
- ///
- public virtual Task PutTemplateAsync(PutTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default)
- {
- descriptor.BeforeRequest();
- return DoRequestAsync(descriptor, cancellationToken);
- }
-
- ///
- ///
- /// Create or update an index template.
- /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
- ///
- /// Learn more about this API in the Elasticsearch documentation.
- ///
- public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default)
- {
- var descriptor = new PutTemplateRequestDescriptor(name);
- descriptor.BeforeRequest();
- return DoRequestAsync(descriptor, cancellationToken);
- }
-
- ///
- ///
- /// Create or update an index template.
- /// Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
- ///
- /// Learn more about this API in the Elasticsearch documentation.
- ///
- public virtual Task PutTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action configureRequest, CancellationToken cancellationToken = default)
- {
- var descriptor = new PutTemplateRequestDescriptor(name);
- configureRequest?.Invoke(descriptor);
- descriptor.BeforeRequest();
- return DoRequestAsync(descriptor, cancellationToken);
- }
-
///
///
/// Returns information about ongoing and completed shard recoveries for one or more indices.
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs
index 41b05db29a..a4e1412450 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs
@@ -32,9 +32,9 @@ public sealed partial class EdgeNGramTokenizer : ITokenizer
[JsonInclude, JsonPropertyName("custom_token_chars")]
public string? CustomTokenChars { get; set; }
[JsonInclude, JsonPropertyName("max_gram")]
- public int MaxGram { get; set; }
+ public int? MaxGram { get; set; }
[JsonInclude, JsonPropertyName("min_gram")]
- public int MinGram { get; set; }
+ public int? MinGram { get; set; }
[JsonInclude, JsonPropertyName("token_chars")]
public ICollection? TokenChars { get; set; }
@@ -54,8 +54,8 @@ public EdgeNGramTokenizerDescriptor() : base()
}
private string? CustomTokenCharsValue { get; set; }
- private int MaxGramValue { get; set; }
- private int MinGramValue { get; set; }
+ private int? MaxGramValue { get; set; }
+ private int? MinGramValue { get; set; }
private ICollection? TokenCharsValue { get; set; }
private string? VersionValue { get; set; }
@@ -65,13 +65,13 @@ public EdgeNGramTokenizerDescriptor CustomTokenChars(string? customTokenChars)
return Self;
}
- public EdgeNGramTokenizerDescriptor MaxGram(int maxGram)
+ public EdgeNGramTokenizerDescriptor MaxGram(int? maxGram)
{
MaxGramValue = maxGram;
return Self;
}
- public EdgeNGramTokenizerDescriptor MinGram(int minGram)
+ public EdgeNGramTokenizerDescriptor MinGram(int? minGram)
{
MinGramValue = minGram;
return Self;
@@ -98,10 +98,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteStringValue(CustomTokenCharsValue);
}
- writer.WritePropertyName("max_gram");
- writer.WriteNumberValue(MaxGramValue);
- writer.WritePropertyName("min_gram");
- writer.WriteNumberValue(MinGramValue);
+ if (MaxGramValue.HasValue)
+ {
+ writer.WritePropertyName("max_gram");
+ writer.WriteNumberValue(MaxGramValue.Value);
+ }
+
+ if (MinGramValue.HasValue)
+ {
+ writer.WritePropertyName("min_gram");
+ writer.WriteNumberValue(MinGramValue.Value);
+ }
+
if (TokenCharsValue is not null)
{
writer.WritePropertyName("token_chars");
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs
index 1c685bd6cc..d0fddb79b9 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/NGramTokenizer.g.cs
@@ -32,9 +32,9 @@ public sealed partial class NGramTokenizer : ITokenizer
[JsonInclude, JsonPropertyName("custom_token_chars")]
public string? CustomTokenChars { get; set; }
[JsonInclude, JsonPropertyName("max_gram")]
- public int MaxGram { get; set; }
+ public int? MaxGram { get; set; }
[JsonInclude, JsonPropertyName("min_gram")]
- public int MinGram { get; set; }
+ public int? MinGram { get; set; }
[JsonInclude, JsonPropertyName("token_chars")]
public ICollection? TokenChars { get; set; }
@@ -54,8 +54,8 @@ public NGramTokenizerDescriptor() : base()
}
private string? CustomTokenCharsValue { get; set; }
- private int MaxGramValue { get; set; }
- private int MinGramValue { get; set; }
+ private int? MaxGramValue { get; set; }
+ private int? MinGramValue { get; set; }
private ICollection? TokenCharsValue { get; set; }
private string? VersionValue { get; set; }
@@ -65,13 +65,13 @@ public NGramTokenizerDescriptor CustomTokenChars(string? customTokenChars)
return Self;
}
- public NGramTokenizerDescriptor MaxGram(int maxGram)
+ public NGramTokenizerDescriptor MaxGram(int? maxGram)
{
MaxGramValue = maxGram;
return Self;
}
- public NGramTokenizerDescriptor MinGram(int minGram)
+ public NGramTokenizerDescriptor MinGram(int? minGram)
{
MinGramValue = minGram;
return Self;
@@ -98,10 +98,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
writer.WriteStringValue(CustomTokenCharsValue);
}
- writer.WritePropertyName("max_gram");
- writer.WriteNumberValue(MaxGramValue);
- writer.WritePropertyName("min_gram");
- writer.WriteNumberValue(MinGramValue);
+ if (MaxGramValue.HasValue)
+ {
+ writer.WritePropertyName("max_gram");
+ writer.WriteNumberValue(MaxGramValue.Value);
+ }
+
+ if (MinGramValue.HasValue)
+ {
+ writer.WritePropertyName("min_gram");
+ writer.WriteNumberValue(MinGramValue.Value);
+ }
+
if (TokenCharsValue is not null)
{
writer.WritePropertyName("token_chars");
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs
index 6d0a3acaab..81ceefaf2c 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Ingest.g.cs
@@ -35,6 +35,8 @@ public enum ConvertType
String,
[EnumMember(Value = "long")]
Long,
+ [EnumMember(Value = "ip")]
+ Ip,
[EnumMember(Value = "integer")]
Integer,
[EnumMember(Value = "float")]
@@ -58,6 +60,8 @@ public override ConvertType Read(ref Utf8JsonReader reader, Type typeToConvert,
return ConvertType.String;
case "long":
return ConvertType.Long;
+ case "ip":
+ return ConvertType.Ip;
case "integer":
return ConvertType.Integer;
case "float":
@@ -84,6 +88,9 @@ public override void Write(Utf8JsonWriter writer, ConvertType value, JsonSeriali
case ConvertType.Long:
writer.WriteStringValue("long");
return;
+ case ConvertType.Ip:
+ writer.WriteStringValue("ip");
+ return;
case ConvertType.Integer:
writer.WriteStringValue("integer");
return;
@@ -105,6 +112,69 @@ public override void Write(Utf8JsonWriter writer, ConvertType value, JsonSeriali
}
}
+[JsonConverter(typeof(FingerprintDigestConverter))]
+public enum FingerprintDigest
+{
+ [EnumMember(Value = "SHA-512")]
+ Sha512,
+ [EnumMember(Value = "SHA-256")]
+ Sha256,
+ [EnumMember(Value = "SHA-1")]
+ Sha1,
+ [EnumMember(Value = "MurmurHash3")]
+ Murmurhash3,
+ [EnumMember(Value = "MD5")]
+ Md5
+}
+
+internal sealed class FingerprintDigestConverter : JsonConverter
+{
+ public override FingerprintDigest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var enumString = reader.GetString();
+ switch (enumString)
+ {
+ case "SHA-512":
+ return FingerprintDigest.Sha512;
+ case "SHA-256":
+ return FingerprintDigest.Sha256;
+ case "SHA-1":
+ return FingerprintDigest.Sha1;
+ case "MurmurHash3":
+ return FingerprintDigest.Murmurhash3;
+ case "MD5":
+ return FingerprintDigest.Md5;
+ }
+
+ ThrowHelper.ThrowJsonException();
+ return default;
+ }
+
+ public override void Write(Utf8JsonWriter writer, FingerprintDigest value, JsonSerializerOptions options)
+ {
+ switch (value)
+ {
+ case FingerprintDigest.Sha512:
+ writer.WriteStringValue("SHA-512");
+ return;
+ case FingerprintDigest.Sha256:
+ writer.WriteStringValue("SHA-256");
+ return;
+ case FingerprintDigest.Sha1:
+ writer.WriteStringValue("SHA-1");
+ return;
+ case FingerprintDigest.Murmurhash3:
+ writer.WriteStringValue("MurmurHash3");
+ return;
+ case FingerprintDigest.Md5:
+ writer.WriteStringValue("MD5");
+ return;
+ }
+
+ writer.WriteNullValue();
+ }
+}
+
[JsonConverter(typeof(GeoGridTargetFormatConverter))]
public enum GeoGridTargetFormat
{
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs
index 22624d5e06..5fd4dcffbe 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Mapping.g.cs
@@ -28,6 +28,298 @@
namespace Elastic.Clients.Elasticsearch.Serverless.Mapping;
+[JsonConverter(typeof(DenseVectorElementTypeConverter))]
+public enum DenseVectorElementType
+{
+ ///
+ ///
+ /// Indexes a 4-byte floating-point value per dimension.
+ ///
+ ///
+ [EnumMember(Value = "float")]
+ Float,
+ ///
+ ///
+ /// Indexes a 1-byte integer value per dimension.
+ ///
+ ///
+ [EnumMember(Value = "byte")]
+ Byte,
+ ///
+ ///
+ /// Indexes a single bit per dimension. Useful for very high-dimensional vectors or models that specifically support
+ /// bit vectors.
+ ///
+ ///
+ /// NOTE: when using bit, the number of dimensions must be a multiple of 8 and must represent the number of bits.
+ ///
+ ///
+ [EnumMember(Value = "bit")]
+ Bit
+}
+
+internal sealed class DenseVectorElementTypeConverter : JsonConverter
+{
+ public override DenseVectorElementType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var enumString = reader.GetString();
+ switch (enumString)
+ {
+ case "float":
+ return DenseVectorElementType.Float;
+ case "byte":
+ return DenseVectorElementType.Byte;
+ case "bit":
+ return DenseVectorElementType.Bit;
+ }
+
+ ThrowHelper.ThrowJsonException();
+ return default;
+ }
+
+ public override void Write(Utf8JsonWriter writer, DenseVectorElementType value, JsonSerializerOptions options)
+ {
+ switch (value)
+ {
+ case DenseVectorElementType.Float:
+ writer.WriteStringValue("float");
+ return;
+ case DenseVectorElementType.Byte:
+ writer.WriteStringValue("byte");
+ return;
+ case DenseVectorElementType.Bit:
+ writer.WriteStringValue("bit");
+ return;
+ }
+
+ writer.WriteNullValue();
+ }
+}
+
+[JsonConverter(typeof(DenseVectorIndexOptionsTypeConverter))]
+public enum DenseVectorIndexOptionsType
+{
+ ///
+ ///
+ /// The default index type for float vectors. This utilizes the HNSW algorithm in addition to automatically scalar
+ /// quantization for scalable approximate kNN search with element_type of float.
+ ///
+ ///
+ /// This can reduce the memory footprint by 4x at the cost of some accuracy.
+ ///
+ ///
+ [EnumMember(Value = "int8_hnsw")]
+ Int8Hnsw,
+ ///
+ ///
+ /// This utilizes a brute-force search algorithm in addition to automatically scalar quantization. Only supports
+ /// element_type of float.
+ ///
+ ///
+ [EnumMember(Value = "int8_flat")]
+ Int8Flat,
+ ///
+ ///
+ /// This utilizes the HNSW algorithm in addition to automatically scalar quantization for scalable approximate kNN
+ /// search with element_type of float.
+ ///
+ ///
+ /// This can reduce the memory footprint by 8x at the cost of some accuracy.
+ ///
+ ///
+ [EnumMember(Value = "int4_hnsw")]
+ Int4Hnsw,
+ ///
+ ///
+ /// This utilizes a brute-force search algorithm in addition to automatically half-byte scalar quantization.
+ /// Only supports element_type of float.
+ ///
+ ///
+ [EnumMember(Value = "int4_flat")]
+ Int4Flat,
+ ///
+ ///
+ /// This utilizes the HNSW algorithm for scalable approximate kNN search. This supports all element_type values.
+ ///
+ ///
+ [EnumMember(Value = "hnsw")]
+ Hnsw,
+ ///
+ ///
+ /// This utilizes a brute-force search algorithm for exact kNN search. This supports all element_type values.
+ ///
+ ///
+ [EnumMember(Value = "flat")]
+ Flat
+}
+
+internal sealed class DenseVectorIndexOptionsTypeConverter : JsonConverter
+{
+ public override DenseVectorIndexOptionsType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var enumString = reader.GetString();
+ switch (enumString)
+ {
+ case "int8_hnsw":
+ return DenseVectorIndexOptionsType.Int8Hnsw;
+ case "int8_flat":
+ return DenseVectorIndexOptionsType.Int8Flat;
+ case "int4_hnsw":
+ return DenseVectorIndexOptionsType.Int4Hnsw;
+ case "int4_flat":
+ return DenseVectorIndexOptionsType.Int4Flat;
+ case "hnsw":
+ return DenseVectorIndexOptionsType.Hnsw;
+ case "flat":
+ return DenseVectorIndexOptionsType.Flat;
+ }
+
+ ThrowHelper.ThrowJsonException();
+ return default;
+ }
+
+ public override void Write(Utf8JsonWriter writer, DenseVectorIndexOptionsType value, JsonSerializerOptions options)
+ {
+ switch (value)
+ {
+ case DenseVectorIndexOptionsType.Int8Hnsw:
+ writer.WriteStringValue("int8_hnsw");
+ return;
+ case DenseVectorIndexOptionsType.Int8Flat:
+ writer.WriteStringValue("int8_flat");
+ return;
+ case DenseVectorIndexOptionsType.Int4Hnsw:
+ writer.WriteStringValue("int4_hnsw");
+ return;
+ case DenseVectorIndexOptionsType.Int4Flat:
+ writer.WriteStringValue("int4_flat");
+ return;
+ case DenseVectorIndexOptionsType.Hnsw:
+ writer.WriteStringValue("hnsw");
+ return;
+ case DenseVectorIndexOptionsType.Flat:
+ writer.WriteStringValue("flat");
+ return;
+ }
+
+ writer.WriteNullValue();
+ }
+}
+
+[JsonConverter(typeof(DenseVectorSimilarityConverter))]
+public enum DenseVectorSimilarity
+{
+ ///
+ ///
+ /// Computes the maximum inner product of two vectors. This is similar to dot_product, but doesn't require vectors
+ /// to be normalized. This means that each vector’s magnitude can significantly effect the score.
+ ///
+ ///
+ /// The document _score is adjusted to prevent negative values. For max_inner_product values < 0, the _score
+ /// is 1 / (1 + -1 * max_inner_product(query, vector)). For non-negative max_inner_product results the _score
+ /// is calculated max_inner_product(query, vector) + 1.
+ ///
+ ///
+ [EnumMember(Value = "max_inner_product")]
+ MaxInnerProduct,
+ ///
+ ///
+ /// Computes similarity based on the L2 distance (also known as Euclidean distance) between the vectors.
+ ///
+ ///
+ /// The document _score is computed as 1 / (1 + l2_norm(query, vector)^2).
+ ///
+ ///
+ /// For bit vectors, instead of using l2_norm, the hamming distance between the vectors is used.
+ ///
+ ///
+ /// The _score transformation is (numBits - hamming(a, b)) / numBits.
+ ///
+ ///
+ [EnumMember(Value = "l2_norm")]
+ L2Norm,
+ ///
+ ///
+ /// Computes the dot product of two unit vectors. This option provides an optimized way to perform cosine similarity.
+ /// The constraints and computed score are defined by element_type.
+ ///
+ ///
+ /// When element_type is float, all vectors must be unit length, including both document and query vectors.
+ ///
+ ///
+ /// The document _score is computed as (1 + dot_product(query, vector)) / 2.
+ ///
+ ///
+ /// When element_type is byte, all vectors must have the same length including both document and query vectors or
+ /// results will be inaccurate.
+ ///
+ ///
+ /// The document _score is computed as 0.5 + (dot_product(query, vector) / (32768 * dims)) where dims is the
+ /// number of dimensions per vector.
+ ///
+ ///
+ [EnumMember(Value = "dot_product")]
+ DotProduct,
+ ///
+ ///
+ /// Computes the cosine similarity. During indexing Elasticsearch automatically normalizes vectors with cosine
+ /// similarity to unit length. This allows to internally use dot_product for computing similarity, which is more
+ /// efficient. Original un-normalized vectors can be still accessed through scripts.
+ ///
+ ///
+ /// The document _score is computed as (1 + cosine(query, vector)) / 2.
+ ///
+ ///
+ /// The cosine similarity does not allow vectors with zero magnitude, since cosine is not defined in this case.
+ ///
+ ///
+ [EnumMember(Value = "cosine")]
+ Cosine
+}
+
+internal sealed class DenseVectorSimilarityConverter : JsonConverter
+{
+ public override DenseVectorSimilarity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var enumString = reader.GetString();
+ switch (enumString)
+ {
+ case "max_inner_product":
+ return DenseVectorSimilarity.MaxInnerProduct;
+ case "l2_norm":
+ return DenseVectorSimilarity.L2Norm;
+ case "dot_product":
+ return DenseVectorSimilarity.DotProduct;
+ case "cosine":
+ return DenseVectorSimilarity.Cosine;
+ }
+
+ ThrowHelper.ThrowJsonException();
+ return default;
+ }
+
+ public override void Write(Utf8JsonWriter writer, DenseVectorSimilarity value, JsonSerializerOptions options)
+ {
+ switch (value)
+ {
+ case DenseVectorSimilarity.MaxInnerProduct:
+ writer.WriteStringValue("max_inner_product");
+ return;
+ case DenseVectorSimilarity.L2Norm:
+ writer.WriteStringValue("l2_norm");
+ return;
+ case DenseVectorSimilarity.DotProduct:
+ writer.WriteStringValue("dot_product");
+ return;
+ case DenseVectorSimilarity.Cosine:
+ writer.WriteStringValue("cosine");
+ return;
+ }
+
+ writer.WriteNullValue();
+ }
+}
+
[JsonConverter(typeof(DynamicMappingConverter))]
public enum DynamicMapping
{
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs
index 8c923b3233..8cfbd13d9b 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs
@@ -29,6 +29,8 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;
public sealed partial class DataStreamVisibility
{
+ [JsonInclude, JsonPropertyName("allow_custom_routing")]
+ public bool? AllowCustomRouting { get; set; }
[JsonInclude, JsonPropertyName("hidden")]
public bool? Hidden { get; set; }
}
@@ -41,8 +43,15 @@ public DataStreamVisibilityDescriptor() : base()
{
}
+ private bool? AllowCustomRoutingValue { get; set; }
private bool? HiddenValue { get; set; }
+ public DataStreamVisibilityDescriptor AllowCustomRouting(bool? allowCustomRouting = true)
+ {
+ AllowCustomRoutingValue = allowCustomRouting;
+ return Self;
+ }
+
public DataStreamVisibilityDescriptor Hidden(bool? hidden = true)
{
HiddenValue = hidden;
@@ -52,6 +61,12 @@ public DataStreamVisibilityDescriptor Hidden(bool? hidden = true)
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
{
writer.WriteStartObject();
+ if (AllowCustomRoutingValue.HasValue)
+ {
+ writer.WritePropertyName("allow_custom_routing");
+ writer.WriteBooleanValue(AllowCustomRoutingValue.Value);
+ }
+
if (HiddenValue.HasValue)
{
writer.WritePropertyName("hidden");
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CommunityIDProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CommunityIDProcessor.g.cs
new file mode 100644
index 0000000000..5bec2b573d
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/CommunityIDProcessor.g.cs
@@ -0,0 +1,1310 @@
+// 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.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Ingest;
+
+public sealed partial class CommunityIDProcessor
+{
+ ///
+ ///
+ /// Description of the processor.
+ /// Useful for describing the purpose of the processor or its configuration.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("description")]
+ public string? Description { get; set; }
+
+ ///
+ ///
+ /// Field containing the destination IP address.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("destination_ip")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? DestinationIp { get; set; }
+
+ ///
+ ///
+ /// Field containing the destination port.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("destination_port")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? DestinationPort { get; set; }
+
+ ///
+ ///
+ /// Field containing the IANA number.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("iana_number")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? IanaNumber { get; set; }
+
+ ///
+ ///
+ /// Field containing the ICMP code.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("icmp_code")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? IcmpCode { get; set; }
+
+ ///
+ ///
+ /// Field containing the ICMP type.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("icmp_type")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? IcmpType { get; set; }
+
+ ///
+ ///
+ /// Conditionally execute the processor.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("if")]
+ public string? If { get; set; }
+
+ ///
+ ///
+ /// Ignore failures for the processor.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("ignore_failure")]
+ public bool? IgnoreFailure { get; set; }
+
+ ///
+ ///
+ /// If true and any required fields are missing, the processor quietly exits
+ /// without modifying the document.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("ignore_missing")]
+ public bool? IgnoreMissing { get; set; }
+
+ ///
+ ///
+ /// Handle failures for the processor.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("on_failure")]
+ public ICollection? OnFailure { get; set; }
+
+ ///
+ ///
+ /// Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The
+ /// seed can prevent hash collisions between network domains, such as a staging
+ /// and production network that use the same addressing scheme.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("seed")]
+ public int? Seed { get; set; }
+
+ ///
+ ///
+ /// Field containing the source IP address.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("source_ip")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? SourceIp { get; set; }
+
+ ///
+ ///
+ /// Field containing the source port.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("source_port")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? SourcePort { get; set; }
+
+ ///
+ ///
+ /// Identifier for the processor.
+ /// Useful for debugging and metrics.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("tag")]
+ public string? Tag { get; set; }
+
+ ///
+ ///
+ /// Output field for the community ID.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("target_field")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; }
+
+ ///
+ ///
+ /// Field containing the transport protocol name or number. Used only when the
+ /// iana_number field is not present. The following protocol names are currently
+ /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("transport")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? Transport { get; set; }
+
+ public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(CommunityIDProcessor communityIDProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.CommunityId(communityIDProcessor);
+}
+
+public sealed partial class CommunityIDProcessorDescriptor : SerializableDescriptor>
+{
+ internal CommunityIDProcessorDescriptor(Action> configure) => configure.Invoke(this);
+
+ public CommunityIDProcessorDescriptor() : base()
+ {
+ }
+
+ private string? DescriptionValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationIpValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationPortValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? IanaNumberValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? IcmpCodeValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? IcmpTypeValue { get; set; }
+ private string? IfValue { get; set; }
+ private bool? IgnoreFailureValue { get; set; }
+ private bool? IgnoreMissingValue { get; set; }
+ private ICollection? OnFailureValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; }
+ private Action> OnFailureDescriptorAction { get; set; }
+ private Action>[] OnFailureDescriptorActions { get; set; }
+ private int? SeedValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? SourceIpValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? SourcePortValue { get; set; }
+ private string? TagValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? TransportValue { get; set; }
+
+ ///
+ ///
+ /// Description of the processor.
+ /// Useful for describing the purpose of the processor or its configuration.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Description(string? description)
+ {
+ DescriptionValue = description;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationIp(Elastic.Clients.Elasticsearch.Serverless.Field? destinationIp)
+ {
+ DestinationIpValue = destinationIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationIp(Expression> destinationIp)
+ {
+ DestinationIpValue = destinationIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationIp(Expression> destinationIp)
+ {
+ DestinationIpValue = destinationIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationPort(Elastic.Clients.Elasticsearch.Serverless.Field? destinationPort)
+ {
+ DestinationPortValue = destinationPort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationPort(Expression> destinationPort)
+ {
+ DestinationPortValue = destinationPort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationPort(Expression> destinationPort)
+ {
+ DestinationPortValue = destinationPort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the IANA number.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IanaNumber(Elastic.Clients.Elasticsearch.Serverless.Field? ianaNumber)
+ {
+ IanaNumberValue = ianaNumber;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the IANA number.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IanaNumber(Expression> ianaNumber)
+ {
+ IanaNumberValue = ianaNumber;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the IANA number.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IanaNumber(Expression> ianaNumber)
+ {
+ IanaNumberValue = ianaNumber;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP code.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpCode(Elastic.Clients.Elasticsearch.Serverless.Field? icmpCode)
+ {
+ IcmpCodeValue = icmpCode;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP code.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpCode(Expression> icmpCode)
+ {
+ IcmpCodeValue = icmpCode;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP code.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpCode(Expression> icmpCode)
+ {
+ IcmpCodeValue = icmpCode;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP type.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpType(Elastic.Clients.Elasticsearch.Serverless.Field? icmpType)
+ {
+ IcmpTypeValue = icmpType;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP type.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpType(Expression> icmpType)
+ {
+ IcmpTypeValue = icmpType;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP type.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpType(Expression> icmpType)
+ {
+ IcmpTypeValue = icmpType;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Conditionally execute the processor.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor If(string? value)
+ {
+ IfValue = value;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Ignore failures for the processor.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true)
+ {
+ IgnoreFailureValue = ignoreFailure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// If true and any required fields are missing, the processor quietly exits
+ /// without modifying the document.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true)
+ {
+ IgnoreMissingValue = ignoreMissing;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Handle failures for the processor.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor OnFailure(ICollection? onFailure)
+ {
+ OnFailureDescriptor = null;
+ OnFailureDescriptorAction = null;
+ OnFailureDescriptorActions = null;
+ OnFailureValue = onFailure;
+ return Self;
+ }
+
+ public CommunityIDProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor)
+ {
+ OnFailureValue = null;
+ OnFailureDescriptorAction = null;
+ OnFailureDescriptorActions = null;
+ OnFailureDescriptor = descriptor;
+ return Self;
+ }
+
+ public CommunityIDProcessorDescriptor OnFailure(Action> configure)
+ {
+ OnFailureValue = null;
+ OnFailureDescriptor = null;
+ OnFailureDescriptorActions = null;
+ OnFailureDescriptorAction = configure;
+ return Self;
+ }
+
+ public CommunityIDProcessorDescriptor OnFailure(params Action>[] configure)
+ {
+ OnFailureValue = null;
+ OnFailureDescriptor = null;
+ OnFailureDescriptorAction = null;
+ OnFailureDescriptorActions = configure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The
+ /// seed can prevent hash collisions between network domains, such as a staging
+ /// and production network that use the same addressing scheme.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Seed(int? seed)
+ {
+ SeedValue = seed;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourceIp(Elastic.Clients.Elasticsearch.Serverless.Field? sourceIp)
+ {
+ SourceIpValue = sourceIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourceIp(Expression> sourceIp)
+ {
+ SourceIpValue = sourceIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourceIp(Expression> sourceIp)
+ {
+ SourceIpValue = sourceIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourcePort(Elastic.Clients.Elasticsearch.Serverless.Field? sourcePort)
+ {
+ SourcePortValue = sourcePort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourcePort(Expression> sourcePort)
+ {
+ SourcePortValue = sourcePort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourcePort(Expression> sourcePort)
+ {
+ SourcePortValue = sourcePort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Identifier for the processor.
+ /// Useful for debugging and metrics.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Tag(string? tag)
+ {
+ TagValue = tag;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Output field for the community ID.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField)
+ {
+ TargetFieldValue = targetField;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Output field for the community ID.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor TargetField(Expression> targetField)
+ {
+ TargetFieldValue = targetField;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Output field for the community ID.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor TargetField(Expression> targetField)
+ {
+ TargetFieldValue = targetField;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the transport protocol name or number. Used only when the
+ /// iana_number field is not present. The following protocol names are currently
+ /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Transport(Elastic.Clients.Elasticsearch.Serverless.Field? transport)
+ {
+ TransportValue = transport;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the transport protocol name or number. Used only when the
+ /// iana_number field is not present. The following protocol names are currently
+ /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Transport(Expression> transport)
+ {
+ TransportValue = transport;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the transport protocol name or number. Used only when the
+ /// iana_number field is not present. The following protocol names are currently
+ /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Transport(Expression> transport)
+ {
+ TransportValue = transport;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (!string.IsNullOrEmpty(DescriptionValue))
+ {
+ writer.WritePropertyName("description");
+ writer.WriteStringValue(DescriptionValue);
+ }
+
+ if (DestinationIpValue is not null)
+ {
+ writer.WritePropertyName("destination_ip");
+ JsonSerializer.Serialize(writer, DestinationIpValue, options);
+ }
+
+ if (DestinationPortValue is not null)
+ {
+ writer.WritePropertyName("destination_port");
+ JsonSerializer.Serialize(writer, DestinationPortValue, options);
+ }
+
+ if (IanaNumberValue is not null)
+ {
+ writer.WritePropertyName("iana_number");
+ JsonSerializer.Serialize(writer, IanaNumberValue, options);
+ }
+
+ if (IcmpCodeValue is not null)
+ {
+ writer.WritePropertyName("icmp_code");
+ JsonSerializer.Serialize(writer, IcmpCodeValue, options);
+ }
+
+ if (IcmpTypeValue is not null)
+ {
+ writer.WritePropertyName("icmp_type");
+ JsonSerializer.Serialize(writer, IcmpTypeValue, options);
+ }
+
+ if (!string.IsNullOrEmpty(IfValue))
+ {
+ writer.WritePropertyName("if");
+ writer.WriteStringValue(IfValue);
+ }
+
+ if (IgnoreFailureValue.HasValue)
+ {
+ writer.WritePropertyName("ignore_failure");
+ writer.WriteBooleanValue(IgnoreFailureValue.Value);
+ }
+
+ if (IgnoreMissingValue.HasValue)
+ {
+ writer.WritePropertyName("ignore_missing");
+ writer.WriteBooleanValue(IgnoreMissingValue.Value);
+ }
+
+ if (OnFailureDescriptor is not null)
+ {
+ writer.WritePropertyName("on_failure");
+ writer.WriteStartArray();
+ JsonSerializer.Serialize(writer, OnFailureDescriptor, options);
+ writer.WriteEndArray();
+ }
+ else if (OnFailureDescriptorAction is not null)
+ {
+ writer.WritePropertyName("on_failure");
+ writer.WriteStartArray();
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options);
+ writer.WriteEndArray();
+ }
+ else if (OnFailureDescriptorActions is not null)
+ {
+ writer.WritePropertyName("on_failure");
+ writer.WriteStartArray();
+ foreach (var action in OnFailureDescriptorActions)
+ {
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options);
+ }
+
+ writer.WriteEndArray();
+ }
+ else if (OnFailureValue is not null)
+ {
+ writer.WritePropertyName("on_failure");
+ JsonSerializer.Serialize(writer, OnFailureValue, options);
+ }
+
+ if (SeedValue.HasValue)
+ {
+ writer.WritePropertyName("seed");
+ writer.WriteNumberValue(SeedValue.Value);
+ }
+
+ if (SourceIpValue is not null)
+ {
+ writer.WritePropertyName("source_ip");
+ JsonSerializer.Serialize(writer, SourceIpValue, options);
+ }
+
+ if (SourcePortValue is not null)
+ {
+ writer.WritePropertyName("source_port");
+ JsonSerializer.Serialize(writer, SourcePortValue, options);
+ }
+
+ if (!string.IsNullOrEmpty(TagValue))
+ {
+ writer.WritePropertyName("tag");
+ writer.WriteStringValue(TagValue);
+ }
+
+ if (TargetFieldValue is not null)
+ {
+ writer.WritePropertyName("target_field");
+ JsonSerializer.Serialize(writer, TargetFieldValue, options);
+ }
+
+ if (TransportValue is not null)
+ {
+ writer.WritePropertyName("transport");
+ JsonSerializer.Serialize(writer, TransportValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
+
+public sealed partial class CommunityIDProcessorDescriptor : SerializableDescriptor
+{
+ internal CommunityIDProcessorDescriptor(Action configure) => configure.Invoke(this);
+
+ public CommunityIDProcessorDescriptor() : base()
+ {
+ }
+
+ private string? DescriptionValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationIpValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? DestinationPortValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? IanaNumberValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? IcmpCodeValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? IcmpTypeValue { get; set; }
+ private string? IfValue { get; set; }
+ private bool? IgnoreFailureValue { get; set; }
+ private bool? IgnoreMissingValue { get; set; }
+ private ICollection? OnFailureValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; }
+ private Action OnFailureDescriptorAction { get; set; }
+ private Action[] OnFailureDescriptorActions { get; set; }
+ private int? SeedValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? SourceIpValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? SourcePortValue { get; set; }
+ private string? TagValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? TransportValue { get; set; }
+
+ ///
+ ///
+ /// Description of the processor.
+ /// Useful for describing the purpose of the processor or its configuration.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Description(string? description)
+ {
+ DescriptionValue = description;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationIp(Elastic.Clients.Elasticsearch.Serverless.Field? destinationIp)
+ {
+ DestinationIpValue = destinationIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationIp(Expression> destinationIp)
+ {
+ DestinationIpValue = destinationIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationIp(Expression> destinationIp)
+ {
+ DestinationIpValue = destinationIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationPort(Elastic.Clients.Elasticsearch.Serverless.Field? destinationPort)
+ {
+ DestinationPortValue = destinationPort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationPort(Expression> destinationPort)
+ {
+ DestinationPortValue = destinationPort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the destination port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor DestinationPort(Expression> destinationPort)
+ {
+ DestinationPortValue = destinationPort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the IANA number.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IanaNumber(Elastic.Clients.Elasticsearch.Serverless.Field? ianaNumber)
+ {
+ IanaNumberValue = ianaNumber;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the IANA number.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IanaNumber(Expression> ianaNumber)
+ {
+ IanaNumberValue = ianaNumber;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the IANA number.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IanaNumber(Expression> ianaNumber)
+ {
+ IanaNumberValue = ianaNumber;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP code.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpCode(Elastic.Clients.Elasticsearch.Serverless.Field? icmpCode)
+ {
+ IcmpCodeValue = icmpCode;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP code.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpCode(Expression> icmpCode)
+ {
+ IcmpCodeValue = icmpCode;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP code.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpCode(Expression> icmpCode)
+ {
+ IcmpCodeValue = icmpCode;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP type.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpType(Elastic.Clients.Elasticsearch.Serverless.Field? icmpType)
+ {
+ IcmpTypeValue = icmpType;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP type.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpType(Expression> icmpType)
+ {
+ IcmpTypeValue = icmpType;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the ICMP type.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IcmpType(Expression> icmpType)
+ {
+ IcmpTypeValue = icmpType;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Conditionally execute the processor.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor If(string? value)
+ {
+ IfValue = value;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Ignore failures for the processor.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true)
+ {
+ IgnoreFailureValue = ignoreFailure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// If true and any required fields are missing, the processor quietly exits
+ /// without modifying the document.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true)
+ {
+ IgnoreMissingValue = ignoreMissing;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Handle failures for the processor.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor OnFailure(ICollection? onFailure)
+ {
+ OnFailureDescriptor = null;
+ OnFailureDescriptorAction = null;
+ OnFailureDescriptorActions = null;
+ OnFailureValue = onFailure;
+ return Self;
+ }
+
+ public CommunityIDProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor)
+ {
+ OnFailureValue = null;
+ OnFailureDescriptorAction = null;
+ OnFailureDescriptorActions = null;
+ OnFailureDescriptor = descriptor;
+ return Self;
+ }
+
+ public CommunityIDProcessorDescriptor OnFailure(Action configure)
+ {
+ OnFailureValue = null;
+ OnFailureDescriptor = null;
+ OnFailureDescriptorActions = null;
+ OnFailureDescriptorAction = configure;
+ return Self;
+ }
+
+ public CommunityIDProcessorDescriptor OnFailure(params Action[] configure)
+ {
+ OnFailureValue = null;
+ OnFailureDescriptor = null;
+ OnFailureDescriptorAction = null;
+ OnFailureDescriptorActions = configure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The
+ /// seed can prevent hash collisions between network domains, such as a staging
+ /// and production network that use the same addressing scheme.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Seed(int? seed)
+ {
+ SeedValue = seed;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourceIp(Elastic.Clients.Elasticsearch.Serverless.Field? sourceIp)
+ {
+ SourceIpValue = sourceIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourceIp(Expression> sourceIp)
+ {
+ SourceIpValue = sourceIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source IP address.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourceIp(Expression> sourceIp)
+ {
+ SourceIpValue = sourceIp;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourcePort(Elastic.Clients.Elasticsearch.Serverless.Field? sourcePort)
+ {
+ SourcePortValue = sourcePort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourcePort(Expression> sourcePort)
+ {
+ SourcePortValue = sourcePort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the source port.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor SourcePort(Expression> sourcePort)
+ {
+ SourcePortValue = sourcePort;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Identifier for the processor.
+ /// Useful for debugging and metrics.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Tag(string? tag)
+ {
+ TagValue = tag;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Output field for the community ID.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor TargetField(Elastic.Clients.Elasticsearch.Serverless.Field? targetField)
+ {
+ TargetFieldValue = targetField;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Output field for the community ID.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor TargetField(Expression> targetField)
+ {
+ TargetFieldValue = targetField;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Output field for the community ID.
+ ///
+ ///
+ public CommunityIDProcessorDescriptor TargetField(Expression> targetField)
+ {
+ TargetFieldValue = targetField;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the transport protocol name or number. Used only when the
+ /// iana_number field is not present. The following protocol names are currently
+ /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Transport(Elastic.Clients.Elasticsearch.Serverless.Field? transport)
+ {
+ TransportValue = transport;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the transport protocol name or number. Used only when the
+ /// iana_number field is not present. The following protocol names are currently
+ /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Transport(Expression> transport)
+ {
+ TransportValue = transport;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Field containing the transport protocol name or number. Used only when the
+ /// iana_number field is not present. The following protocol names are currently
+ /// supported: eigrp, gre, icmp, icmpv6, igmp, ipv6-icmp, ospf, pim, sctp, tcp, udp
+ ///
+ ///
+ public CommunityIDProcessorDescriptor Transport(Expression> transport)
+ {
+ TransportValue = transport;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (!string.IsNullOrEmpty(DescriptionValue))
+ {
+ writer.WritePropertyName("description");
+ writer.WriteStringValue(DescriptionValue);
+ }
+
+ if (DestinationIpValue is not null)
+ {
+ writer.WritePropertyName("destination_ip");
+ JsonSerializer.Serialize(writer, DestinationIpValue, options);
+ }
+
+ if (DestinationPortValue is not null)
+ {
+ writer.WritePropertyName("destination_port");
+ JsonSerializer.Serialize(writer, DestinationPortValue, options);
+ }
+
+ if (IanaNumberValue is not null)
+ {
+ writer.WritePropertyName("iana_number");
+ JsonSerializer.Serialize(writer, IanaNumberValue, options);
+ }
+
+ if (IcmpCodeValue is not null)
+ {
+ writer.WritePropertyName("icmp_code");
+ JsonSerializer.Serialize(writer, IcmpCodeValue, options);
+ }
+
+ if (IcmpTypeValue is not null)
+ {
+ writer.WritePropertyName("icmp_type");
+ JsonSerializer.Serialize(writer, IcmpTypeValue, options);
+ }
+
+ if (!string.IsNullOrEmpty(IfValue))
+ {
+ writer.WritePropertyName("if");
+ writer.WriteStringValue(IfValue);
+ }
+
+ if (IgnoreFailureValue.HasValue)
+ {
+ writer.WritePropertyName("ignore_failure");
+ writer.WriteBooleanValue(IgnoreFailureValue.Value);
+ }
+
+ if (IgnoreMissingValue.HasValue)
+ {
+ writer.WritePropertyName("ignore_missing");
+ writer.WriteBooleanValue(IgnoreMissingValue.Value);
+ }
+
+ if (OnFailureDescriptor is not null)
+ {
+ writer.WritePropertyName("on_failure");
+ writer.WriteStartArray();
+ JsonSerializer.Serialize(writer, OnFailureDescriptor, options);
+ writer.WriteEndArray();
+ }
+ else if (OnFailureDescriptorAction is not null)
+ {
+ writer.WritePropertyName("on_failure");
+ writer.WriteStartArray();
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(OnFailureDescriptorAction), options);
+ writer.WriteEndArray();
+ }
+ else if (OnFailureDescriptorActions is not null)
+ {
+ writer.WritePropertyName("on_failure");
+ writer.WriteStartArray();
+ foreach (var action in OnFailureDescriptorActions)
+ {
+ JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor(action), options);
+ }
+
+ writer.WriteEndArray();
+ }
+ else if (OnFailureValue is not null)
+ {
+ writer.WritePropertyName("on_failure");
+ JsonSerializer.Serialize(writer, OnFailureValue, options);
+ }
+
+ if (SeedValue.HasValue)
+ {
+ writer.WritePropertyName("seed");
+ writer.WriteNumberValue(SeedValue.Value);
+ }
+
+ if (SourceIpValue is not null)
+ {
+ writer.WritePropertyName("source_ip");
+ JsonSerializer.Serialize(writer, SourceIpValue, options);
+ }
+
+ if (SourcePortValue is not null)
+ {
+ writer.WritePropertyName("source_port");
+ JsonSerializer.Serialize(writer, SourcePortValue, options);
+ }
+
+ if (!string.IsNullOrEmpty(TagValue))
+ {
+ writer.WritePropertyName("tag");
+ writer.WriteStringValue(TagValue);
+ }
+
+ if (TargetFieldValue is not null)
+ {
+ writer.WritePropertyName("target_field");
+ JsonSerializer.Serialize(writer, TargetFieldValue, options);
+ }
+
+ if (TransportValue is not null)
+ {
+ writer.WritePropertyName("transport");
+ JsonSerializer.Serialize(writer, TransportValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs
index 667ad4196c..4119d07eea 100644
--- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/DateProcessor.g.cs
@@ -88,6 +88,15 @@ public sealed partial class DateProcessor
[JsonInclude, JsonPropertyName("on_failure")]
public ICollection? OnFailure { get; set; }
+ ///
+ ///
+ /// The format to use when writing the date to target_field. Must be a valid
+ /// java time pattern.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("output_format")]
+ public string? OutputFormat { get; set; }
+
///
///
/// Identifier for the processor.
@@ -135,6 +144,7 @@ public DateProcessorDescriptor() : base()
private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; }
private Action> OnFailureDescriptorAction { get; set; }
private Action>[] OnFailureDescriptorActions { get; set; }
+ private string? OutputFormatValue { get; set; }
private string? TagValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; }
private string? TimezoneValue { get; set; }
@@ -271,6 +281,18 @@ public DateProcessorDescriptor OnFailure(params Action
+ ///
+ /// The format to use when writing the date to target_field. Must be a valid
+ /// java time pattern.
+ ///
+ ///
+ public DateProcessorDescriptor OutputFormat(string? outputFormat)
+ {
+ OutputFormatValue = outputFormat;
+ return Self;
+ }
+
///
///
/// Identifier for the processor.
@@ -390,6 +412,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, OnFailureValue, options);
}
+ if (!string.IsNullOrEmpty(OutputFormatValue))
+ {
+ writer.WritePropertyName("output_format");
+ writer.WriteStringValue(OutputFormatValue);
+ }
+
if (!string.IsNullOrEmpty(TagValue))
{
writer.WritePropertyName("tag");
@@ -430,6 +458,7 @@ public DateProcessorDescriptor() : base()
private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; }
private Action OnFailureDescriptorAction { get; set; }
private Action[] OnFailureDescriptorActions { get; set; }
+ private string? OutputFormatValue { get; set; }
private string? TagValue { get; set; }
private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; }
private string? TimezoneValue { get; set; }
@@ -566,6 +595,18 @@ public DateProcessorDescriptor OnFailure(params Action
+ ///
+ /// The format to use when writing the date to target_field. Must be a valid
+ /// java time pattern.
+ ///
+ ///
+ public DateProcessorDescriptor OutputFormat(string? outputFormat)
+ {
+ OutputFormatValue = outputFormat;
+ return Self;
+ }
+
///
///
/// Identifier for the processor.
@@ -685,6 +726,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
JsonSerializer.Serialize(writer, OnFailureValue, options);
}
+ if (!string.IsNullOrEmpty(OutputFormatValue))
+ {
+ writer.WritePropertyName("output_format");
+ writer.WriteStringValue(OutputFormatValue);
+ }
+
if (!string.IsNullOrEmpty(TagValue))
{
writer.WritePropertyName("tag");
diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FingerprintProcessor.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FingerprintProcessor.g.cs
new file mode 100644
index 0000000000..810dbfa370
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Ingest/FingerprintProcessor.g.cs
@@ -0,0 +1,676 @@
+// 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.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Serverless.Fluent;
+using Elastic.Clients.Elasticsearch.Serverless.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Serverless.Ingest;
+
+public sealed partial class FingerprintProcessor
+{
+ ///
+ ///
+ /// Description of the processor.
+ /// Useful for describing the purpose of the processor or its configuration.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("description")]
+ public string? Description { get; set; }
+
+ ///
+ ///
+ /// Array of fields to include in the fingerprint. For objects, the processor
+ /// hashes both the field key and value. For other fields, the processor hashes
+ /// only the field value.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("fields")]
+ [JsonConverter(typeof(SingleOrManyFieldsConverter))]
+ public Elastic.Clients.Elasticsearch.Serverless.Fields Fields { get; set; }
+
+ ///
+ ///
+ /// Conditionally execute the processor.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("if")]
+ public string? If { get; set; }
+
+ ///
+ ///
+ /// Ignore failures for the processor.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("ignore_failure")]
+ public bool? IgnoreFailure { get; set; }
+
+ ///
+ ///
+ /// If true, the processor ignores any missing fields. If all fields are
+ /// missing, the processor silently exits without modifying the document.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("ignore_missing")]
+ public bool? IgnoreMissing { get; set; }
+
+ ///
+ ///
+ /// The hash method used to compute the fingerprint. Must be one of MD5, SHA-1,
+ /// SHA-256, SHA-512, or MurmurHash3.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("method")]
+ public Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintDigest? Method { get; set; }
+
+ ///
+ ///
+ /// Handle failures for the processor.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("on_failure")]
+ public ICollection? OnFailure { get; set; }
+
+ ///
+ ///
+ /// Salt value for the hash function.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("salt")]
+ public string? Salt { get; set; }
+
+ ///
+ ///
+ /// Identifier for the processor.
+ /// Useful for debugging and metrics.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("tag")]
+ public string? Tag { get; set; }
+
+ ///
+ ///
+ /// Output field for the fingerprint.
+ ///
+ ///
+ [JsonInclude, JsonPropertyName("target_field")]
+ public Elastic.Clients.Elasticsearch.Serverless.Field? TargetField { get; set; }
+
+ public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor(FingerprintProcessor fingerprintProcessor) => Elastic.Clients.Elasticsearch.Serverless.Ingest.Processor.Fingerprint(fingerprintProcessor);
+}
+
+public sealed partial class FingerprintProcessorDescriptor : SerializableDescriptor>
+{
+ internal FingerprintProcessorDescriptor(Action> configure) => configure.Invoke(this);
+
+ public FingerprintProcessorDescriptor() : base()
+ {
+ }
+
+ private string? DescriptionValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Fields FieldsValue { get; set; }
+ private string? IfValue { get; set; }
+ private bool? IgnoreFailureValue { get; set; }
+ private bool? IgnoreMissingValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintDigest? MethodValue { get; set; }
+ private ICollection? OnFailureValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor OnFailureDescriptor { get; set; }
+ private Action> OnFailureDescriptorAction { get; set; }
+ private Action>[] OnFailureDescriptorActions { get; set; }
+ private string? SaltValue { get; set; }
+ private string? TagValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Serverless.Field? TargetFieldValue { get; set; }
+
+ ///
+ ///
+ /// Description of the processor.
+ /// Useful for describing the purpose of the processor or its configuration.
+ ///
+ ///
+ public FingerprintProcessorDescriptor Description(string? description)
+ {
+ DescriptionValue = description;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Array of fields to include in the fingerprint. For objects, the processor
+ /// hashes both the field key and value. For other fields, the processor hashes
+ /// only the field value.
+ ///
+ ///
+ public FingerprintProcessorDescriptor Fields(Elastic.Clients.Elasticsearch.Serverless.Fields fields)
+ {
+ FieldsValue = fields;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Conditionally execute the processor.
+ ///
+ ///
+ public FingerprintProcessorDescriptor If(string? value)
+ {
+ IfValue = value;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Ignore failures for the processor.
+ ///
+ ///
+ public FingerprintProcessorDescriptor IgnoreFailure(bool? ignoreFailure = true)
+ {
+ IgnoreFailureValue = ignoreFailure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// If true, the processor ignores any missing fields. If all fields are
+ /// missing, the processor silently exits without modifying the document.
+ ///
+ ///
+ public FingerprintProcessorDescriptor IgnoreMissing(bool? ignoreMissing = true)
+ {
+ IgnoreMissingValue = ignoreMissing;
+ return Self;
+ }
+
+ ///
+ ///
+ /// The hash method used to compute the fingerprint. Must be one of MD5, SHA-1,
+ /// SHA-256, SHA-512, or MurmurHash3.
+ ///
+ ///
+ public FingerprintProcessorDescriptor Method(Elastic.Clients.Elasticsearch.Serverless.Ingest.FingerprintDigest? method)
+ {
+ MethodValue = method;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Handle failures for the processor.
+ ///
+ ///
+ public FingerprintProcessorDescriptor OnFailure(ICollection? onFailure)
+ {
+ OnFailureDescriptor = null;
+ OnFailureDescriptorAction = null;
+ OnFailureDescriptorActions = null;
+ OnFailureValue = onFailure;
+ return Self;
+ }
+
+ public FingerprintProcessorDescriptor OnFailure(Elastic.Clients.Elasticsearch.Serverless.Ingest.ProcessorDescriptor descriptor)
+ {
+ OnFailureValue = null;
+ OnFailureDescriptorAction = null;
+ OnFailureDescriptorActions = null;
+ OnFailureDescriptor = descriptor;
+ return Self;
+ }
+
+ public FingerprintProcessorDescriptor OnFailure(Action> configure)
+ {
+ OnFailureValue = null;
+ OnFailureDescriptor = null;
+ OnFailureDescriptorActions = null;
+ OnFailureDescriptorAction = configure;
+ return Self;
+ }
+
+ public FingerprintProcessorDescriptor OnFailure(params Action>[] configure)
+ {
+ OnFailureValue = null;
+ OnFailureDescriptor = null;
+ OnFailureDescriptorAction = null;
+ OnFailureDescriptorActions = configure;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Salt value for the hash function.
+ ///
+ ///
+ public FingerprintProcessorDescriptor Salt(string? salt)
+ {
+ SaltValue = salt;
+ return Self;
+ }
+
+ ///
+ ///
+ /// Identifier for the processor.
+ /// Useful for debugging and metrics.
+ ///
+ ///
+ public FingerprintProcessorDescriptor Tag(string? tag)
+ {
+ TagValue = tag;
+ return Self;
+ }
+
+ ///
+ ///