diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs index 20eff988aac..a9b2ed28aae 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs @@ -248,7 +248,7 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty if (property == "knn") { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); + variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -836,8 +836,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices /// Defines the approximate kNN search to run. /// [JsonInclude, JsonPropertyName("knn")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnQuery))] - public ICollection? Knn { get; set; } + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnSearch))] + public ICollection? Knn { get; set; } /// /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
@@ -1028,10 +1028,10 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action> KnnDescriptorAction { get; set; } - private Action>[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action> KnnDescriptorAction { get; set; } + private Action>[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -1242,7 +1242,7 @@ public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) + public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -1251,7 +1251,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(ICollection Knn(Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor descriptor) + public SubmitAsyncSearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor descriptor) { KnnValue = null; KnnDescriptorAction = null; @@ -1260,7 +1260,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(Elastic.Clients.Elastic return Self; } - public SubmitAsyncSearchRequestDescriptor Knn(Action> configure) + public SubmitAsyncSearchRequestDescriptor Knn(Action> configure) { KnnValue = null; KnnDescriptor = null; @@ -1269,7 +1269,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(Action Knn(params Action>[] configure) + public SubmitAsyncSearchRequestDescriptor Knn(params Action>[] configure) { KnnValue = null; KnnDescriptor = null; @@ -1740,7 +1740,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -1749,7 +1749,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -1758,7 +1758,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) @@ -2074,10 +2074,10 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action KnnDescriptorAction { get; set; } - private Action[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action KnnDescriptorAction { get; set; } + private Action[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -2288,7 +2288,7 @@ public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. /// - public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) + public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -2297,7 +2297,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(ICollection configure) + public SubmitAsyncSearchRequestDescriptor Knn(Action configure) { KnnValue = null; KnnDescriptor = null; @@ -2315,7 +2315,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(Action[] configure) + public SubmitAsyncSearchRequestDescriptor Knn(params Action[] configure) { KnnValue = null; KnnDescriptor = null; @@ -2786,7 +2786,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -2795,7 +2795,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -2804,7 +2804,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs index 6d3e9638da7..fc112ea6a33 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs @@ -31,6 +31,8 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Cluster; public sealed partial class PutComponentTemplateRequestParameters : RequestParameters { + public string? Cause { get => Q("cause"); set => Q("cause", value); } + /// /// If `true`, this request cannot replace or update existing component templates. /// @@ -63,6 +65,9 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name internal override string OperationName => "cluster.put_component_template"; + [JsonIgnore] + public string? Cause { get => Q("cause"); set => Q("cause", value); } + /// /// If `true`, this request cannot replace or update existing component templates. /// @@ -76,10 +81,10 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that
template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false` then data streams matching the template must always be explicitly created.
+ /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
///
- [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; set; } + [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } /// /// Optional user metadata about the component template.
May have any contents. This map is not automatically generated by Elasticsearch.
This information is stored in the cluster state, so keeping it short is preferable.
To unset `_meta`, replace the template without specifying this information.
@@ -123,6 +128,7 @@ public PutComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serve internal override string OperationName => "cluster.put_component_template"; + public PutComponentTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); public PutComponentTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public PutComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); @@ -132,7 +138,7 @@ public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Ela return Self; } - private bool? AllowAutoCreateValue { get; set; } + private bool? DeprecatedValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexState TemplateValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStateDescriptor TemplateDescriptor { get; set; } @@ -140,11 +146,11 @@ public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Ela private long? VersionValue { get; set; } /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that
template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false` then data streams matching the template must always be explicitly created.
+ /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
///
- public PutComponentTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + public PutComponentTemplateRequestDescriptor Deprecated(bool? deprecated = true) { - AllowAutoCreateValue = allowAutoCreate; + DeprecatedValue = deprecated; return Self; } @@ -196,10 +202,10 @@ public PutComponentTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) + if (DeprecatedValue.HasValue) { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); } if (MetaValue is not null) @@ -257,6 +263,7 @@ public PutComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serve internal override string OperationName => "cluster.put_component_template"; + public PutComponentTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); public PutComponentTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public PutComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); @@ -266,7 +273,7 @@ public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch. return Self; } - private bool? AllowAutoCreateValue { get; set; } + private bool? DeprecatedValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexState TemplateValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexStateDescriptor TemplateDescriptor { get; set; } @@ -274,11 +281,11 @@ public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch. private long? VersionValue { get; set; } /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that
template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false` then data streams matching the template must always be explicitly created.
+ /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
///
- public PutComponentTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + public PutComponentTemplateRequestDescriptor Deprecated(bool? deprecated = true) { - AllowAutoCreateValue = allowAutoCreate; + DeprecatedValue = deprecated; return Self; } @@ -330,10 +337,10 @@ public PutComponentTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) + if (DeprecatedValue.HasValue) { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); } if (MetaValue is not null) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateResponse.g.cs index 6cbdb35710c..8a17e893b80 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateResponse.g.cs @@ -35,7 +35,7 @@ public sealed partial class CreateResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("_primary_term")] - public long PrimaryTerm { get; init; } + public long? PrimaryTerm { get; init; } [JsonInclude, JsonPropertyName("result")] public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } [JsonInclude, JsonPropertyName("_seq_no")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteResponse.g.cs index 15cc949e689..8d7c61570b4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteResponse.g.cs @@ -35,7 +35,7 @@ public sealed partial class DeleteResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("_primary_term")] - public long PrimaryTerm { get; init; } + public long? PrimaryTerm { get; init; } [JsonInclude, JsonPropertyName("result")] public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } [JsonInclude, JsonPropertyName("_seq_no")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs index 01ae1244018..50e8b9d90b3 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs @@ -31,10 +31,20 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; public sealed partial class PutIndexTemplateRequestParameters : RequestParameters { + /// + /// User defined reason for creating/updating the index template + /// + 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); } } /// @@ -54,12 +64,30 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name nam internal override string OperationName => "indices.put_index_template"; + /// + /// User defined reason for creating/updating the index 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); } + + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ [JsonInclude, JsonPropertyName("allow_auto_create")] + public bool? AllowAutoCreate { get; set; } + /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -72,6 +100,18 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name nam [JsonInclude, JsonPropertyName("data_stream")] public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStream { get; set; } + /// + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ [JsonInclude, JsonPropertyName("ignore_missing_component_templates")] + public ICollection? IgnoreMissingComponentTemplates { get; set; } + /// /// Name of the index template to create. /// @@ -88,7 +128,7 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name nam /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
[JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; set; } + public long? Priority { get; set; } /// /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
@@ -122,7 +162,9 @@ public PutIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverles internal override string OperationName => "indices.put_index_template"; + public PutIndexTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); public PutIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); + public PutIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) { @@ -130,18 +172,30 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elastic return Self; } + private bool? AllowAutoCreateValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } + private long? PriorityValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } private Action> TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ public PutIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -178,6 +232,24 @@ public PutIndexTemplateRequestDescriptor DataStream(Action + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ public PutIndexTemplateRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ public PutIndexTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + /// /// Name of the index template to create. /// @@ -199,7 +271,7 @@ public PutIndexTemplateRequestDescriptor Meta(Func /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
- public PutIndexTemplateRequestDescriptor Priority(int? priority) + public PutIndexTemplateRequestDescriptor Priority(long? priority) { PriorityValue = priority; return Self; @@ -244,6 +316,12 @@ public PutIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + if (ComposedOfValue is not null) { writer.WritePropertyName("composed_of"); @@ -266,6 +344,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DataStreamValue, options); } + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + if (IndexPatternsValue is not null) { writer.WritePropertyName("index_patterns"); @@ -329,7 +419,9 @@ public PutIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverles internal override string OperationName => "indices.put_index_template"; + public PutIndexTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); public PutIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); + public PutIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) { @@ -337,18 +429,30 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serv return Self; } + private bool? AllowAutoCreateValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } + private long? PriorityValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } private Action TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ public PutIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -385,6 +489,24 @@ public PutIndexTemplateRequestDescriptor DataStream(Action + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ /// + public PutIndexTemplateRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ public PutIndexTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + /// /// Name of the index template to create. /// @@ -406,7 +528,7 @@ public PutIndexTemplateRequestDescriptor Meta(Func /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
/// - public PutIndexTemplateRequestDescriptor Priority(int? priority) + public PutIndexTemplateRequestDescriptor Priority(long? priority) { PriorityValue = priority; return Self; @@ -451,6 +573,12 @@ public PutIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + if (ComposedOfValue is not null) { writer.WritePropertyName("composed_of"); @@ -473,6 +601,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DataStreamValue, options); } + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + if (IndexPatternsValue is not null) { writer.WritePropertyName("index_patterns"); 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 index 0001c3e93eb..314e4bed7c2 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs @@ -31,25 +31,17 @@ 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); } - /// - /// If `true`, returns settings in flat format. - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", 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); } - - /// - /// Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.
- ///
- public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -69,17 +61,14 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : internal override string OperationName => "indices.put_template"; - /// - /// If true, this request cannot replace or update existing index templates. - /// [JsonIgnore] - public bool? Create { get => Q("create"); set => Q("create", value); } + public string? Cause { get => Q("cause"); set => Q("cause", value); } /// - /// If `true`, returns settings in flat format. + /// If true, this request cannot replace or update existing index templates. /// [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } + 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.
@@ -87,12 +76,6 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) : [JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - /// - /// Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.
- ///
- [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - /// /// Aliases for the index. /// @@ -151,10 +134,9 @@ public PutTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Nam 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 FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public PutTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutTemplateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); public PutTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) { @@ -316,10 +298,9 @@ public PutTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Nam 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 FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public PutTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutTemplateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); public PutTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) { diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs index 79efbc68bc9..96bec2b3d3d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs @@ -31,18 +31,13 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; public sealed partial class SimulateIndexTemplateRequestParameters : RequestParameters { - /// - /// If `true`, the template passed in the body is only used if no existing
templates match the same index patterns. If `false`, the simulation uses
the template with the highest priority. Note that the template is not
permanently added or updated in either case; it is only used for the
simulation.
- ///
- public bool? Create { get => Q("create"); set => Q("create", value); } - /// /// If true, returns all relevant default configurations for the index template. /// public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", 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.
+ /// 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); } } @@ -57,16 +52,10 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Nam protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => true; + internal override bool SupportsBody => false; internal override string OperationName => "indices.simulate_index_template"; - /// - /// If `true`, the template passed in the body is only used if no existing
templates match the same index patterns. If `false`, the simulation uses
the template with the highest priority. Note that the template is not
permanently added or updated in either case; it is only used for the
simulation.
- ///
- [JsonIgnore] - public bool? Create { get => Q("create"); set => Q("create", value); } - /// /// If true, returns all relevant default configurations for the index template. /// @@ -74,280 +63,10 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Nam public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", 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.
+ /// 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); } - - /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
- ///
- [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; set; } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- [JsonInclude, JsonPropertyName("composed_of")] - public ICollection? ComposedOf { get; set; } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- [JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStream { get; set; } - - /// - /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. - /// - [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatterns { get; set; } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- [JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; set; } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? Template { 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; } -} - -public sealed partial class SimulateIndexTemplateRequestDescriptor : RequestDescriptor, SimulateIndexTemplateRequestParameters> -{ - internal SimulateIndexTemplateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public SimulateIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSimulateIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.simulate_index_template"; - - public SimulateIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); - public SimulateIndexTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public SimulateIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection? ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
- ///
- public SimulateIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- public SimulateIndexTemplateRequestDescriptor ComposedOf(ICollection? composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- public SimulateIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. - /// - public SimulateIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Indices? indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - if (ComposedOfValue is not null) - { - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - } - - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (IndexPatternsValue is not null) - { - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } } public sealed partial class SimulateIndexTemplateRequestDescriptor : RequestDescriptor @@ -362,11 +81,10 @@ public SimulateIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serv protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => true; + internal override bool SupportsBody => false; internal override string OperationName => "indices.simulate_index_template"; - public SimulateIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public SimulateIndexTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public SimulateIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); @@ -376,198 +94,7 @@ public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch return Self; } - private bool? AllowAutoCreateValue { get; set; } - private ICollection? ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
- ///
- public SimulateIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- public SimulateIndexTemplateRequestDescriptor ComposedOf(ICollection? composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- public SimulateIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. - /// - public SimulateIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Indices? indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - if (ComposedOfValue is not null) - { - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - } - - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (IndexPatternsValue is not null) - { - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, 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/SimulateIndexTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs index 4de9f9ad58e..d5f4ab63e53 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs @@ -28,4 +28,8 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; public sealed partial class SimulateIndexTemplateResponse : ElasticsearchResponse { + [JsonInclude, JsonPropertyName("overlapping")] + public IReadOnlyCollection? Overlapping { get; init; } + [JsonInclude, JsonPropertyName("template")] + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Template Template { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs index fdcf88ce839..ed54b91e737 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs @@ -85,8 +85,66 @@ public SimulateTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name? na ///
[JsonIgnore] public Elastic.Clients.Elasticsearch.Serverless.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - [JsonIgnore] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplate? Template { get; set; } + + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ [JsonInclude, JsonPropertyName("allow_auto_create")] + public bool? AllowAutoCreate { get; set; } + + /// + /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
+ ///
+ [JsonInclude, JsonPropertyName("composed_of")] + public ICollection? ComposedOf { get; set; } + + /// + /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
+ ///
+ [JsonInclude, JsonPropertyName("data_stream")] + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStream { get; set; } + + /// + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ [JsonInclude, JsonPropertyName("ignore_missing_component_templates")] + public ICollection? IgnoreMissingComponentTemplates { get; set; } + + /// + /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. + /// + [JsonInclude, JsonPropertyName("index_patterns")] + public Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatterns { get; set; } + + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ [JsonInclude, JsonPropertyName("_meta")] + public IDictionary? Meta { get; set; } + + /// + /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
+ ///
+ [JsonInclude, JsonPropertyName("priority")] + public long? Priority { get; set; } + + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ [JsonInclude, JsonPropertyName("template")] + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? Template { 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; } } /// @@ -122,11 +180,115 @@ public SimulateTemplateRequestDescriptor Name(Elastic.Clients.Elastic return Self; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplate? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } + private bool? AllowAutoCreateValue { get; set; } + private ICollection? ComposedOfValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } + private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } + private long? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action> TemplateDescriptorAction { get; set; } + private long? VersionValue { get; set; } + + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ public SimulateTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + + /// + /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
+ ///
+ public SimulateTemplateRequestDescriptor ComposedOf(ICollection? composedOf) + { + ComposedOfValue = composedOf; + return Self; + } + + /// + /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
+ ///
+ public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? dataStream) + { + DataStreamDescriptor = null; + DataStreamDescriptorAction = null; + DataStreamValue = dataStream; + return Self; + } + + public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor descriptor) + { + DataStreamValue = null; + DataStreamDescriptorAction = null; + DataStreamDescriptor = descriptor; + return Self; + } + + public SimulateTemplateRequestDescriptor DataStream(Action configure) + { + DataStreamValue = null; + DataStreamDescriptor = null; + DataStreamDescriptorAction = configure; + return Self; + } + + /// + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ public SimulateTemplateRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ public SimulateTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + + /// + /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. + /// + public SimulateTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Indices? indexPatterns) + { + IndexPatternsValue = indexPatterns; + return Self; + } - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplate? template) + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Priority(long? priority) + { + PriorityValue = priority; + return Self; + } + + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) { TemplateDescriptor = null; TemplateDescriptorAction = null; @@ -134,7 +296,7 @@ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Ela return Self; } - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDescriptor descriptor) + public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor descriptor) { TemplateValue = null; TemplateDescriptorAction = null; @@ -142,7 +304,7 @@ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Ela return Self; } - public SimulateTemplateRequestDescriptor Template(Action> configure) + public SimulateTemplateRequestDescriptor Template(Action> configure) { TemplateValue = null; TemplateDescriptor = null; @@ -150,8 +312,99 @@ public SimulateTemplateRequestDescriptor Template(Action + /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { + writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + + if (ComposedOfValue is not null) + { + writer.WritePropertyName("composed_of"); + JsonSerializer.Serialize(writer, ComposedOfValue, options); + } + + if (DataStreamDescriptor is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamDescriptor, options); + } + else if (DataStreamDescriptorAction is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); + } + else if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + + if (IndexPatternsValue is not null) + { + writer.WritePropertyName("index_patterns"); + JsonSerializer.Serialize(writer, IndexPatternsValue, options); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PriorityValue.HasValue) + { + writer.WritePropertyName("priority"); + writer.WriteNumberValue(PriorityValue.Value); + } + + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + + if (VersionValue.HasValue) + { + writer.WritePropertyName("version"); + writer.WriteNumberValue(VersionValue.Value); + } + + writer.WriteEndObject(); } } @@ -188,11 +441,115 @@ public SimulateTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serv return Self; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplate? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } + private bool? AllowAutoCreateValue { get; set; } + private ICollection? ComposedOfValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } + private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } + private long? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action TemplateDescriptorAction { get; set; } + private long? VersionValue { get; set; } + + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ public SimulateTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + + /// + /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
+ ///
+ public SimulateTemplateRequestDescriptor ComposedOf(ICollection? composedOf) + { + ComposedOfValue = composedOf; + return Self; + } + + /// + /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
+ ///
+ public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibility? dataStream) + { + DataStreamDescriptor = null; + DataStreamDescriptorAction = null; + DataStreamValue = dataStream; + return Self; + } + + public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor descriptor) + { + DataStreamValue = null; + DataStreamDescriptorAction = null; + DataStreamDescriptor = descriptor; + return Self; + } - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplate? template) + public SimulateTemplateRequestDescriptor DataStream(Action configure) + { + DataStreamValue = null; + DataStreamDescriptor = null; + DataStreamDescriptorAction = configure; + return Self; + } + + /// + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ public SimulateTemplateRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ public SimulateTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + + /// + /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. + /// + public SimulateTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Indices? indexPatterns) + { + IndexPatternsValue = indexPatterns; + return Self; + } + + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Priority(long? priority) + { + PriorityValue = priority; + return Self; + } + + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMapping? template) { TemplateDescriptor = null; TemplateDescriptorAction = null; @@ -200,7 +557,7 @@ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch. return Self; } - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDescriptor descriptor) + public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor descriptor) { TemplateValue = null; TemplateDescriptorAction = null; @@ -208,7 +565,7 @@ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch. return Self; } - public SimulateTemplateRequestDescriptor Template(Action configure) + public SimulateTemplateRequestDescriptor Template(Action configure) { TemplateValue = null; TemplateDescriptor = null; @@ -216,7 +573,98 @@ public SimulateTemplateRequestDescriptor Template(Action + /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { + writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + + if (ComposedOfValue is not null) + { + writer.WritePropertyName("composed_of"); + JsonSerializer.Serialize(writer, ComposedOfValue, options); + } + + if (DataStreamDescriptor is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamDescriptor, options); + } + else if (DataStreamDescriptorAction is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); + } + else if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + + if (IndexPatternsValue is not null) + { + writer.WritePropertyName("index_patterns"); + JsonSerializer.Serialize(writer, IndexPatternsValue, options); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PriorityValue.HasValue) + { + writer.WritePropertyName("priority"); + writer.WriteNumberValue(PriorityValue.Value); + } + + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, 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/IndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexResponse.g.cs index 4ae32f9aecf..09eb78e87ac 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexResponse.g.cs @@ -35,7 +35,7 @@ public sealed partial class IndexResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("_primary_term")] - public long PrimaryTerm { get; init; } + public long? PrimaryTerm { get; init; } [JsonInclude, JsonPropertyName("result")] public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } [JsonInclude, JsonPropertyName("_seq_no")] diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs index 3ce5241b078..c21b70a97ed 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs @@ -245,7 +245,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "knn") { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); + variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -851,8 +851,8 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices) /// Defines the approximate kNN search to run. /// [JsonInclude, JsonPropertyName("knn")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnQuery))] - public ICollection? Knn { get; set; } + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.KnnSearch))] + public ICollection? Knn { get; set; } /// /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
@@ -1074,10 +1074,10 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action> KnnDescriptorAction { get; set; } - private Action>[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action> KnnDescriptorAction { get; set; } + private Action>[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -1300,7 +1300,7 @@ public SearchRequestDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public SearchRequestDescriptor Knn(ICollection? knn) + public SearchRequestDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -1309,7 +1309,7 @@ public SearchRequestDescriptor Knn(ICollection Knn(Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor descriptor) + public SearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor descriptor) { KnnValue = null; KnnDescriptorAction = null; @@ -1318,7 +1318,7 @@ public SearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.Serv return Self; } - public SearchRequestDescriptor Knn(Action> configure) + public SearchRequestDescriptor Knn(Action> configure) { KnnValue = null; KnnDescriptor = null; @@ -1327,7 +1327,7 @@ public SearchRequestDescriptor Knn(Action Knn(params Action>[] configure) + public SearchRequestDescriptor Knn(params Action>[] configure) { KnnValue = null; KnnDescriptor = null; @@ -1846,7 +1846,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -1855,7 +1855,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -1864,7 +1864,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) @@ -2193,10 +2193,10 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless. private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action KnnDescriptorAction { get; set; } - private Action[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action KnnDescriptorAction { get; set; } + private Action[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -2419,7 +2419,7 @@ public SearchRequestDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. /// - public SearchRequestDescriptor Knn(ICollection? knn) + public SearchRequestDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -2428,7 +2428,7 @@ public SearchRequestDescriptor Knn(ICollection configure) + public SearchRequestDescriptor Knn(Action configure) { KnnValue = null; KnnDescriptor = null; @@ -2446,7 +2446,7 @@ public SearchRequestDescriptor Knn(Action[] configure) + public SearchRequestDescriptor Knn(params Action[] configure) { KnnValue = null; KnnDescriptor = null; @@ -2965,7 +2965,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -2974,7 +2974,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -2983,7 +2983,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateResponse.g.cs index be92ceb3e30..72d2d8ba209 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/UpdateResponse.g.cs @@ -37,7 +37,7 @@ public sealed partial class UpdateResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("_primary_term")] - public long PrimaryTerm { get; init; } + public long? PrimaryTerm { get; init; } [JsonInclude, JsonPropertyName("result")] public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; } [JsonInclude, JsonPropertyName("_seq_no")] 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 c41dbec525d..7e1c1a20add 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 @@ -3563,39 +3563,6 @@ public virtual Task SimulateIndexTemplateAsync(Si return DoRequestAsync(request, cancellationToken); } - /// - /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateIndexTemplateResponse, SimulateIndexTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateIndexTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateIndexTemplateResponse, SimulateIndexTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Serverless.Name name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateIndexTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateIndexTemplateResponse, SimulateIndexTemplateRequestParameters>(descriptor, cancellationToken); - } - /// /// Simulate matching the given index name against the index templates in the system /// Learn more about this API in the Elasticsearch documentation. diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs index c83936708f1..1b24c7c2168 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class AdjacencyMatrixAggregation /// [JsonInclude, JsonPropertyName("filters")] public IDictionary? Filters { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(AdjacencyMatrixAggregation adjacencyMatrixAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.AdjacencyMatrix(adjacencyMatrixAggregation); } @@ -51,8 +47,6 @@ public AdjacencyMatrixAggregationDescriptor() : base() } private IDictionary> FiltersValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Filters used to create buckets.
At least one filter is required.
@@ -63,18 +57,6 @@ public AdjacencyMatrixAggregationDescriptor Filters(Func Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AdjacencyMatrixAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -84,18 +66,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FiltersValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } @@ -109,8 +79,6 @@ public AdjacencyMatrixAggregationDescriptor() : base() } private IDictionary FiltersValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Filters used to create buckets.
At least one filter is required.
@@ -121,18 +89,6 @@ public AdjacencyMatrixAggregationDescriptor Filters(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AdjacencyMatrixAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -142,18 +98,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FiltersValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs index bcad834754b..a06ef9773bc 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs @@ -46,8 +46,6 @@ public sealed partial class AutoDateHistogramAggregation ///
[JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The minimum rounding interval.
This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than `minimum_interval`.
@@ -60,8 +58,6 @@ public sealed partial class AutoDateHistogramAggregation ///
[JsonInclude, JsonPropertyName("missing")] public DateTimeOffset? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Time zone specified as a ISO 8601 UTC offset. @@ -93,10 +89,8 @@ public AutoDateHistogramAggregationDescriptor() : base() private int? BucketsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinimumInterval? MinimumIntervalValue { get; set; } private DateTimeOffset? MissingValue { get; set; } - private string? NameValue { get; set; } private string? OffsetValue { get; set; } private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } @@ -147,12 +141,6 @@ public AutoDateHistogramAggregationDescriptor Format(string? format) return Self; } - public AutoDateHistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum rounding interval.
This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than `minimum_interval`.
///
@@ -171,12 +159,6 @@ public AutoDateHistogramAggregationDescriptor Missing(DateTimeOffset? return Self; } - public AutoDateHistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Time zone specified as a ISO 8601 UTC offset. /// @@ -228,12 +210,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinimumIntervalValue is not null) { writer.WritePropertyName("minimum_interval"); @@ -246,12 +222,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(OffsetValue)) { writer.WritePropertyName("offset"); @@ -291,10 +261,8 @@ public AutoDateHistogramAggregationDescriptor() : base() private int? BucketsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MinimumInterval? MinimumIntervalValue { get; set; } private DateTimeOffset? MissingValue { get; set; } - private string? NameValue { get; set; } private string? OffsetValue { get; set; } private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } @@ -345,12 +313,6 @@ public AutoDateHistogramAggregationDescriptor Format(string? format) return Self; } - public AutoDateHistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum rounding interval.
This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than `minimum_interval`.
///
@@ -369,12 +331,6 @@ public AutoDateHistogramAggregationDescriptor Missing(DateTimeOffset? missing) return Self; } - public AutoDateHistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Time zone specified as a ISO 8601 UTC offset. /// @@ -426,12 +382,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinimumIntervalValue is not null) { writer.WritePropertyName("minimum_interval"); @@ -444,12 +394,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(OffsetValue)) { writer.WritePropertyName("offset"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs index a326711c5cd..a9c6154d883 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class AverageBucketAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(AverageBucketAggregation averageBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.AvgBucket(averageBucketAggregation); } @@ -65,8 +61,6 @@ public AverageBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public AverageBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearc return Self; } - public AverageBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AverageBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs index 9b5a4c03aa6..bb58ced0e56 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class BucketScriptAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The script to run for this aggregation. @@ -71,8 +67,6 @@ public BucketScriptAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } /// @@ -102,18 +96,6 @@ public BucketScriptAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch return Self; } - public BucketScriptAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketScriptAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The script to run for this aggregation. /// @@ -144,18 +126,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ScriptValue is not null) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs index 789ca7b81ec..c8a7730be4d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class BucketSelectorAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The script to run for this aggregation. @@ -71,8 +67,6 @@ public BucketSelectorAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } /// @@ -102,18 +96,6 @@ public BucketSelectorAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsear return Self; } - public BucketSelectorAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketSelectorAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The script to run for this aggregation. /// @@ -144,18 +126,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ScriptValue is not null) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs index cd9ab6d677c..d516fbb3beb 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/BucketSortAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class BucketSortAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
@@ -71,8 +67,6 @@ public BucketSortAggregationDescriptor() : base() private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? SizeValue { get; set; } private ICollection? SortValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } @@ -97,18 +91,6 @@ public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elas return Self; } - public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketSortAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
///
@@ -172,18 +154,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SizeValue.HasValue) { writer.WritePropertyName("size"); @@ -233,8 +203,6 @@ public BucketSortAggregationDescriptor() : base() private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? SizeValue { get; set; } private ICollection? SortValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortOptionsDescriptor SortDescriptor { get; set; } @@ -259,18 +227,6 @@ public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.S return Self; } - public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketSortAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
///
@@ -334,18 +290,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SizeValue.HasValue) { writer.WritePropertyName("size"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregation.g.cs index b7ce1c25751..7840a57fd0d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ChildrenAggregation.g.cs @@ -29,11 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; public sealed partial class ChildrenAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// The child type that should be selected. /// @@ -51,22 +46,8 @@ public ChildrenAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private string? TypeValue { get; set; } - public ChildrenAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ChildrenAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The child type that should be selected. /// @@ -79,18 +60,6 @@ public ChildrenAggregationDescriptor Type(string? type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(TypeValue)) { writer.WritePropertyName("type"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs index 13533c14ce0..3fcbc0ec673 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CompositeAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class CompositeAggregation ///
[JsonInclude, JsonPropertyName("after")] public IDictionary? After { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The number of composite buckets that should be returned. @@ -63,8 +59,6 @@ public CompositeAggregationDescriptor() : base() } private IDictionary? AfterValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? SizeValue { get; set; } private ICollection>? SourcesValue { get; set; } @@ -77,18 +71,6 @@ public CompositeAggregationDescriptor After(Func Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CompositeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of composite buckets that should be returned. /// @@ -116,18 +98,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, AfterValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SizeValue.HasValue) { writer.WritePropertyName("size"); @@ -153,8 +123,6 @@ public CompositeAggregationDescriptor() : base() } private IDictionary? AfterValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? SizeValue { get; set; } private ICollection>? SourcesValue { get; set; } @@ -167,18 +135,6 @@ public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CompositeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of composite buckets that should be returned. /// @@ -206,18 +162,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, AfterValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SizeValue.HasValue) { writer.WritePropertyName("size"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs index 6b058cb9a79..d0b15dfcc69 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class CumulativeCardinalityAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(CumulativeCardinalityAggregation cumulativeCardinalityAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.CumulativeCardinality(cumulativeCardinalityAggregation); } @@ -65,8 +61,6 @@ public CumulativeCardinalityAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public CumulativeCardinalityAggregationDescriptor GapPolicy(Elastic.Clients.Elas return Self; } - public CumulativeCardinalityAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CumulativeCardinalityAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs index dfa5a86846f..f29f407c71d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class CumulativeSumAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(CumulativeSumAggregation cumulativeSumAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.CumulativeSum(cumulativeSumAggregation); } @@ -65,8 +61,6 @@ public CumulativeSumAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public CumulativeSumAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearc return Self; } - public CumulativeSumAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CumulativeSumAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs index 11c615e8be2..86b47df64e2 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs @@ -52,8 +52,6 @@ public sealed partial class DateHistogramAggregation /// [JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, all buckets between the first bucket that matches documents and the last one are returned.
@@ -66,8 +64,6 @@ public sealed partial class DateHistogramAggregation ///
[JsonInclude, JsonPropertyName("missing")] public DateTimeOffset? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Changes the start value of each bucket by the specified positive (`+`) or negative offset (`-`) duration. @@ -108,10 +104,8 @@ public DateHistogramAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? FixedIntervalValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private DateTimeOffset? MissingValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? OffsetValue { get; set; } private ICollection>? OrderValue { get; set; } private IDictionary? ParamsValue { get; set; } @@ -172,12 +166,6 @@ public DateHistogramAggregationDescriptor Format(string? format) return Self; } - public DateHistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, all buckets between the first bucket that matches documents and the last one are returned.
///
@@ -196,12 +184,6 @@ public DateHistogramAggregationDescriptor Missing(DateTimeOffset? mis return Self; } - public DateHistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Changes the start value of each bucket by the specified positive (`+`) or negative offset (`-`) duration. /// @@ -268,12 +250,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -286,12 +262,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OffsetValue is not null) { writer.WritePropertyName("offset"); @@ -338,10 +308,8 @@ public DateHistogramAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? FixedIntervalValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private DateTimeOffset? MissingValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Duration? OffsetValue { get; set; } private ICollection>? OrderValue { get; set; } private IDictionary? ParamsValue { get; set; } @@ -402,12 +370,6 @@ public DateHistogramAggregationDescriptor Format(string? format) return Self; } - public DateHistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, all buckets between the first bucket that matches documents and the last one are returned.
///
@@ -426,12 +388,6 @@ public DateHistogramAggregationDescriptor Missing(DateTimeOffset? missing) return Self; } - public DateHistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Changes the start value of each bucket by the specified positive (`+`) or negative offset (`-`) duration. /// @@ -498,12 +454,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -516,12 +466,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OffsetValue is not null) { writer.WritePropertyName("offset"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregation.g.cs index 99e5b69c5a9..997a4c65878 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DateRangeAggregation.g.cs @@ -40,16 +40,12 @@ public sealed partial class DateRangeAggregation ///
[JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
[JsonInclude, JsonPropertyName("missing")] public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Array of date ranges. @@ -76,9 +72,7 @@ public DateRangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -121,12 +115,6 @@ public DateRangeAggregationDescriptor Format(string? format) return Self; } - public DateRangeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -136,12 +124,6 @@ public DateRangeAggregationDescriptor Missing(Elastic.Clients.Elastic return Self; } - public DateRangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Array of date ranges. /// @@ -205,24 +187,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); @@ -274,9 +244,7 @@ public DateRangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.DateRangeExpressionDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -319,12 +287,6 @@ public DateRangeAggregationDescriptor Format(string? format) return Self; } - public DateRangeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -334,12 +296,6 @@ public DateRangeAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serv return Self; } - public DateRangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Array of date ranges. /// @@ -403,24 +359,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregation.g.cs index d829aa976bf..31a5d633215 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DerivativeAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class DerivativeAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(DerivativeAggregation derivativeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Derivative(derivativeAggregation); } @@ -65,8 +61,6 @@ public DerivativeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public DerivativeAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.S return Self; } - public DerivativeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DerivativeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs index d110d606974..7d7617ec9d7 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class DiversifiedSamplerAggregation /// [JsonInclude, JsonPropertyName("max_docs_per_value")] public int? MaxDocsPerValue { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } [JsonInclude, JsonPropertyName("script")] public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } @@ -73,8 +69,6 @@ public DiversifiedSamplerAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregationExecutionHint? ExecutionHintValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private int? MaxDocsPerValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } @@ -123,18 +117,6 @@ public DiversifiedSamplerAggregationDescriptor MaxDocsPerValue(int? m return Self; } - public DiversifiedSamplerAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) { ScriptValue = script; @@ -171,18 +153,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDocsPerValueValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ScriptValue is not null) { writer.WritePropertyName("script"); @@ -210,8 +180,6 @@ public DiversifiedSamplerAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.SamplerAggregationExecutionHint? ExecutionHintValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private int? MaxDocsPerValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } @@ -260,18 +228,6 @@ public DiversifiedSamplerAggregationDescriptor MaxDocsPerValue(int? maxDocsPerVa return Self; } - public DiversifiedSamplerAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) { ScriptValue = script; @@ -308,18 +264,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDocsPerValueValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ScriptValue is not null) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs index 498c47e9d48..c1ff51ce10b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class ExtendedStatsBucketAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The number of standard deviations above/below the mean to display. @@ -71,8 +67,6 @@ public ExtendedStatsBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private double? SigmaValue { get; set; } /// @@ -102,18 +96,6 @@ public ExtendedStatsBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasti return Self; } - public ExtendedStatsBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ExtendedStatsBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of standard deviations above/below the mean to display. /// @@ -144,18 +126,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SigmaValue.HasValue) { writer.WritePropertyName("sigma"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregation.g.cs index 4b26bf7fd10..7f7323c763a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/FiltersAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class FiltersAggregation /// [JsonInclude, JsonPropertyName("filters")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? Filters { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters. @@ -63,8 +59,6 @@ public FiltersAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? FiltersValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private bool? OtherBucketValue { get; set; } private string? OtherBucketKeyValue { get; set; } @@ -77,18 +71,6 @@ public FiltersAggregationDescriptor Filters(Elastic.Clients.Elasticse return Self; } - public FiltersAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FiltersAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters. /// @@ -116,18 +98,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FiltersValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OtherBucketValue.HasValue) { writer.WritePropertyName("other_bucket"); @@ -153,8 +123,6 @@ public FiltersAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.Buckets? FiltersValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private bool? OtherBucketValue { get; set; } private string? OtherBucketKeyValue { get; set; } @@ -167,18 +135,6 @@ public FiltersAggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Server return Self; } - public FiltersAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FiltersAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters. /// @@ -206,18 +162,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FiltersValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OtherBucketValue.HasValue) { writer.WritePropertyName("other_bucket"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs index f2ddd161e66..05e60f90306 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class GeoDistanceAggregation /// [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The origin used to evaluate the distance. @@ -76,8 +72,6 @@ public GeoDistanceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoLocation? OriginValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } @@ -121,18 +115,6 @@ public GeoDistanceAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeoDistanceAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The origin used to evaluate the distance. /// @@ -205,18 +187,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OriginValue is not null) { writer.WritePropertyName("origin"); @@ -274,8 +244,6 @@ public GeoDistanceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.GeoDistanceType? DistanceTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeoLocation? OriginValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } @@ -319,18 +287,6 @@ public GeoDistanceAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeoDistanceAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The origin used to evaluate the distance. /// @@ -403,18 +359,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OriginValue is not null) { writer.WritePropertyName("origin"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs index 84e57d7bb01..3f0e2cc3ad9 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class GeohashGridAggregation /// [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The string length of the geohashes used to define cells/buckets in the results. @@ -76,8 +72,6 @@ public GeohashGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -118,18 +112,6 @@ public GeohashGridAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeohashGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The string length of the geohashes used to define cells/buckets in the results. /// @@ -172,18 +154,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue is not null) { writer.WritePropertyName("precision"); @@ -216,8 +186,6 @@ public GeohashGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.GeohashPrecision? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -258,18 +226,6 @@ public GeohashGridAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeohashGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The string length of the geohashes used to define cells/buckets in the results. /// @@ -312,18 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue is not null) { writer.WritePropertyName("precision"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs index 073ce69370c..9f3271be624 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class GeohexGridAggregation /// [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Integer zoom of the key used to defined cells or buckets
in the results. Value should be between 0-15.
@@ -76,8 +72,6 @@ public GeohexGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -118,18 +112,6 @@ public GeohexGridAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeohexGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Integer zoom of the key used to defined cells or buckets
in the results. Value should be between 0-15.
///
@@ -168,18 +150,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); @@ -212,8 +182,6 @@ public GeohexGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -254,18 +222,6 @@ public GeohexGridAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeohexGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Integer zoom of the key used to defined cells or buckets
in the results. Value should be between 0-15.
///
@@ -304,18 +260,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs index 60a415e6516..da67eceef79 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class GeotileGridAggregation ///
[JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Integer zoom of the key used to define cells/buckets in the results.
Values outside of the range [0,29] will be rejected.
@@ -77,8 +73,6 @@ public GeotileGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private double? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -119,18 +113,6 @@ public GeotileGridAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeotileGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Integer zoom of the key used to define cells/buckets in the results.
Values outside of the range [0,29] will be rejected.
///
@@ -173,18 +155,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); @@ -217,8 +187,6 @@ public GeotileGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private double? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -259,18 +227,6 @@ public GeotileGridAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeotileGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Integer zoom of the key used to define cells/buckets in the results.
Values outside of the range [0,29] will be rejected.
///
@@ -313,18 +269,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregation.g.cs index c35cb8ac4a3..244d0e213aa 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/GlobalAggregation.g.cs @@ -29,12 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; public sealed partial class GlobalAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(GlobalAggregation globalAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Global(globalAggregation); } public sealed partial class GlobalAggregationDescriptor : SerializableDescriptor @@ -45,36 +39,9 @@ public GlobalAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } - - public GlobalAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GlobalAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregation.g.cs index a77b77a39be..b61e37c1690 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/HistogramAggregation.g.cs @@ -42,8 +42,6 @@ public sealed partial class HistogramAggregation ///
[JsonInclude, JsonPropertyName("interval")] public double? Interval { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, the response will fill gaps in the histogram with empty buckets.
@@ -56,8 +54,6 @@ public sealed partial class HistogramAggregation ///
[JsonInclude, JsonPropertyName("missing")] public double? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// By default, the bucket keys start with 0 and then continue in even spaced steps of `interval`.
The bucket boundaries can be shifted by using the `offset` option.
@@ -89,10 +85,8 @@ public HistogramAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } private double? IntervalValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private double? MissingValue { get; set; } - private string? NameValue { get; set; } private double? OffsetValue { get; set; } private ICollection>? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } @@ -139,12 +133,6 @@ public HistogramAggregationDescriptor Interval(double? interval) return Self; } - public HistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, the response will fill gaps in the histogram with empty buckets.
///
@@ -163,12 +151,6 @@ public HistogramAggregationDescriptor Missing(double? missing) return Self; } - public HistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// By default, the bucket keys start with 0 and then continue in even spaced steps of `interval`.
The bucket boundaries can be shifted by using the `offset` option.
///
@@ -214,12 +196,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(IntervalValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -232,12 +208,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MissingValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OffsetValue.HasValue) { writer.WritePropertyName("offset"); @@ -271,10 +241,8 @@ public HistogramAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } private double? IntervalValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private double? MissingValue { get; set; } - private string? NameValue { get; set; } private double? OffsetValue { get; set; } private ICollection>? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } @@ -321,12 +289,6 @@ public HistogramAggregationDescriptor Interval(double? interval) return Self; } - public HistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, the response will fill gaps in the histogram with empty buckets.
///
@@ -345,12 +307,6 @@ public HistogramAggregationDescriptor Missing(double? missing) return Self; } - public HistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// By default, the bucket keys start with 0 and then continue in even spaced steps of `interval`.
The bucket boundaries can be shifted by using the `offset` option.
///
@@ -396,12 +352,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(IntervalValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -414,12 +364,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MissingValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OffsetValue.HasValue) { writer.WritePropertyName("offset"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs index 5707910c05b..d2d7345c81f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/InferenceAggregation.g.cs @@ -52,16 +52,12 @@ public sealed partial class InferenceAggregation ///
[JsonInclude, JsonPropertyName("inference_config")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfig { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The ID or alias for the trained model. /// [JsonInclude, JsonPropertyName("model_id")] public Elastic.Clients.Elasticsearch.Serverless.Name ModelId { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(InferenceAggregation inferenceAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Inference(inferenceAggregation); } @@ -80,9 +76,7 @@ public InferenceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } private Action> InferenceConfigDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Name ModelIdValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -138,12 +132,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The ID or alias for the trained model. /// @@ -153,12 +141,6 @@ public InferenceAggregationDescriptor ModelId(Elastic.Clients.Elastic return Self; } - public InferenceAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -196,20 +178,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InferenceConfigValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - writer.WritePropertyName("model_id"); JsonSerializer.Serialize(writer, ModelIdValue, options); - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } @@ -228,9 +198,7 @@ public InferenceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } private Action InferenceConfigDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Name ModelIdValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -286,12 +254,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The ID or alias for the trained model. /// @@ -301,12 +263,6 @@ public InferenceAggregationDescriptor ModelId(Elastic.Clients.Elasticsearch.Serv return Self; } - public InferenceAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -344,20 +300,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InferenceConfigValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - writer.WritePropertyName("model_id"); JsonSerializer.Serialize(writer, ModelIdValue, options); - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs index 883db983043..a425dd00f19 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs @@ -46,16 +46,12 @@ public sealed partial class IpPrefixAggregation /// [JsonInclude, JsonPropertyName("is_ipv6")] public bool? IsIpv6 { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Minimum number of documents in a bucket for it to be included in the response. /// [JsonInclude, JsonPropertyName("min_doc_count")] public long? MinDocCount { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Length of the network prefix. For IPv4 addresses the accepted range is [0, 32].
For IPv6 addresses the accepted range is [0, 128].
@@ -77,9 +73,7 @@ public IpPrefixAggregationDescriptor() : base() private bool? AppendPrefixLengthValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private bool? IsIpv6Value { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private int PrefixLengthValue { get; set; } /// @@ -127,12 +121,6 @@ public IpPrefixAggregationDescriptor IsIpv6(bool? isIpv6 = true) return Self; } - public IpPrefixAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Minimum number of documents in a bucket for it to be included in the response. /// @@ -142,12 +130,6 @@ public IpPrefixAggregationDescriptor MinDocCount(long? minDocCount) return Self; } - public IpPrefixAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Length of the network prefix. For IPv4 addresses the accepted range is [0, 32].
For IPv6 addresses the accepted range is [0, 128].
///
@@ -174,24 +156,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IsIpv6Value.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WritePropertyName("prefix_length"); writer.WriteNumberValue(PrefixLengthValue); writer.WriteEndObject(); @@ -209,9 +179,7 @@ public IpPrefixAggregationDescriptor() : base() private bool? AppendPrefixLengthValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } private bool? IsIpv6Value { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private int PrefixLengthValue { get; set; } /// @@ -259,12 +227,6 @@ public IpPrefixAggregationDescriptor IsIpv6(bool? isIpv6 = true) return Self; } - public IpPrefixAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Minimum number of documents in a bucket for it to be included in the response. /// @@ -274,12 +236,6 @@ public IpPrefixAggregationDescriptor MinDocCount(long? minDocCount) return Self; } - public IpPrefixAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Length of the network prefix. For IPv4 addresses the accepted range is [0, 32].
For IPv6 addresses the accepted range is [0, 128].
///
@@ -306,24 +262,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IsIpv6Value.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WritePropertyName("prefix_length"); writer.WriteNumberValue(PrefixLengthValue); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregation.g.cs index e3b9bcf0012..b33901bb662 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/IpRangeAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class IpRangeAggregation ///
[JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Array of IP ranges. @@ -57,8 +53,6 @@ public IpRangeAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -91,18 +85,6 @@ public IpRangeAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IpRangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Array of IP ranges. /// @@ -151,18 +133,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); @@ -207,8 +177,6 @@ public IpRangeAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.IpRangeAggregationRangeDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -241,18 +209,6 @@ public IpRangeAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IpRangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Array of IP ranges. /// @@ -301,18 +257,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs index fc13e84baf2..481f7b76243 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs @@ -35,8 +35,6 @@ public sealed partial class MatrixStatsAggregation [JsonInclude, JsonPropertyName("fields")] [JsonConverter(typeof(SingleOrManyFieldsConverter))] public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
@@ -49,8 +47,6 @@ public sealed partial class MatrixStatsAggregation ///
[JsonInclude, JsonPropertyName("mode")] public Elastic.Clients.Elasticsearch.Serverless.SortMode? Mode { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MatrixStatsAggregation matrixStatsAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MatrixStats(matrixStatsAggregation); } @@ -64,10 +60,8 @@ public MatrixStatsAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private IDictionary? MetaValue { get; set; } private IDictionary? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - private string? NameValue { get; set; } /// /// An array of fields for computing the statistics. @@ -78,12 +72,6 @@ public MatrixStatsAggregationDescriptor Fields(Elastic.Clients.Elasti return Self; } - public MatrixStatsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -102,12 +90,6 @@ public MatrixStatsAggregationDescriptor Mode(Elastic.Clients.Elastics return Self; } - public MatrixStatsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -117,12 +99,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); @@ -135,12 +111,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ModeValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } @@ -154,10 +124,8 @@ public MatrixStatsAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Fields? FieldsValue { get; set; } - private IDictionary? MetaValue { get; set; } private IDictionary? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.SortMode? ModeValue { get; set; } - private string? NameValue { get; set; } /// /// An array of fields for computing the statistics. @@ -168,12 +136,6 @@ public MatrixStatsAggregationDescriptor Fields(Elastic.Clients.Elasticsearch.Ser return Self; } - public MatrixStatsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -192,12 +154,6 @@ public MatrixStatsAggregationDescriptor Mode(Elastic.Clients.Elasticsearch.Serve return Self; } - public MatrixStatsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -207,12 +163,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); @@ -225,12 +175,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ModeValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs index 6258dfe4b2b..39e68d085f5 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class MaxBucketAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MaxBucketAggregation maxBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MaxBucket(maxBucketAggregation); } @@ -65,8 +61,6 @@ public MaxBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public MaxBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Se return Self; } - public MaxBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MaxBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinBucketAggregation.g.cs index 43699f17289..7768e4b5f99 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MinBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class MinBucketAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MinBucketAggregation minBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.MinBucket(minBucketAggregation); } @@ -65,8 +61,6 @@ public MinBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public MinBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Se return Self; } - public MinBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MinBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregation.g.cs index c962e96f558..a3c1e51bc5f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MissingAggregation.g.cs @@ -34,12 +34,8 @@ public sealed partial class MissingAggregation /// [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("missing")] public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(MissingAggregation missingAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Missing(missingAggregation); } @@ -53,9 +49,7 @@ public MissingAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } /// /// The name of the field. @@ -84,24 +78,12 @@ public MissingAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public MissingAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) { MissingValue = missing; return Self; } - public MissingAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -111,24 +93,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } @@ -142,9 +112,7 @@ public MissingAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } /// /// The name of the field. @@ -173,24 +141,12 @@ public MissingAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public MissingAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serverless.FieldValue? missing) { MissingValue = missing; return Self; } - public MissingAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -200,24 +156,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs index 426e2c120aa..2ce20f78016 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class MovingFunctionAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The script that should be executed on each window of data. @@ -83,8 +79,6 @@ public MovingFunctionAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private string? ScriptValue { get; set; } private int? ShiftValue { get; set; } private int? WindowValue { get; set; } @@ -116,18 +110,6 @@ public MovingFunctionAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsear return Self; } - public MovingFunctionAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MovingFunctionAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The script that should be executed on each window of data. /// @@ -176,18 +158,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(ScriptValue)) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs index f1bd13e1e2c..88b752ce250 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class MovingPercentilesAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// By default, the window consists of the last n values excluding the current bucket.
Increasing `shift` by 1, moves the starting window position by 1 to the right.
@@ -77,8 +73,6 @@ public MovingPercentilesAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? ShiftValue { get; set; } private int? WindowValue { get; set; } @@ -109,18 +103,6 @@ public MovingPercentilesAggregationDescriptor GapPolicy(Elastic.Clients.Elastics return Self; } - public MovingPercentilesAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MovingPercentilesAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// By default, the window consists of the last n values excluding the current bucket.
Increasing `shift` by 1, moves the starting window position by 1 to the right.
///
@@ -160,18 +142,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ShiftValue.HasValue) { writer.WritePropertyName("shift"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs index ba485830223..e365218c7ad 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs @@ -34,16 +34,12 @@ public sealed partial class MultiTermsAggregation ///
[JsonInclude, JsonPropertyName("collect_mode")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectMode { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The minimum number of documents in a bucket for it to be returned. /// [JsonInclude, JsonPropertyName("min_doc_count")] public long? MinDocCount { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
@@ -94,9 +90,7 @@ public MultiTermsAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private ICollection>? OrderValue { get; set; } private long? ShardMinDocCountValue { get; set; } private int? ShardSizeValue { get; set; } @@ -116,12 +110,6 @@ public MultiTermsAggregationDescriptor CollectMode(Elastic.Clients.El return Self; } - public MultiTermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum number of documents in a bucket for it to be returned. /// @@ -131,12 +119,6 @@ public MultiTermsAggregationDescriptor MinDocCount(long? minDocCount) return Self; } - public MultiTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
///
@@ -230,24 +212,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CollectModeValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); @@ -322,9 +292,7 @@ public MultiTermsAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private ICollection>? OrderValue { get; set; } private long? ShardMinDocCountValue { get; set; } private int? ShardSizeValue { get; set; } @@ -344,12 +312,6 @@ public MultiTermsAggregationDescriptor CollectMode(Elastic.Clients.Elasticsearch return Self; } - public MultiTermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum number of documents in a bucket for it to be returned. /// @@ -359,12 +321,6 @@ public MultiTermsAggregationDescriptor MinDocCount(long? minDocCount) return Self; } - public MultiTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
///
@@ -458,24 +414,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CollectModeValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregation.g.cs index b05c6fda2ce..cb89b03b67f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/NestedAggregation.g.cs @@ -29,11 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; public sealed partial class NestedAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// The path to the field of type `nested`. /// @@ -51,22 +46,8 @@ public NestedAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - public NestedAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public NestedAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The path to the field of type `nested`. /// @@ -97,18 +78,6 @@ public NestedAggregationDescriptor Path(Expression? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - public NestedAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public NestedAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The path to the field of type `nested`. /// @@ -173,18 +128,6 @@ public NestedAggregationDescriptor Path(Expression [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The specific method to apply. /// [JsonInclude, JsonPropertyName("method")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.NormalizeMethod? Method { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(NormalizeAggregation normalizeAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.Normalize(normalizeAggregation); } @@ -71,9 +67,7 @@ public NormalizeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.NormalizeMethod? MethodValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -102,12 +96,6 @@ public NormalizeAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Se return Self; } - public NormalizeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The specific method to apply. /// @@ -117,12 +105,6 @@ public NormalizeAggregationDescriptor Method(Elastic.Clients.Elasticsearch.Serve return Self; } - public NormalizeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -144,24 +126,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MethodValue is not null) { writer.WritePropertyName("method"); JsonSerializer.Serialize(writer, MethodValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregation.g.cs index 1043b93f1b6..2ff1ae31713 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ParentAggregation.g.cs @@ -29,11 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; public sealed partial class ParentAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// The child type that should be selected. /// @@ -51,22 +46,8 @@ public ParentAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private string? TypeValue { get; set; } - public ParentAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ParentAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The child type that should be selected. /// @@ -79,18 +60,6 @@ public ParentAggregationDescriptor Type(string? type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(TypeValue)) { writer.WritePropertyName("type"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs index 55dd4b86aeb..dddbac76eea 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class PercentilesBucketAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The list of percentiles to calculate. @@ -71,8 +67,6 @@ public PercentilesBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private ICollection? PercentsValue { get; set; } /// @@ -102,18 +96,6 @@ public PercentilesBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elastics return Self; } - public PercentilesBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PercentilesBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The list of percentiles to calculate. /// @@ -144,18 +126,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentsValue is not null) { writer.WritePropertyName("percents"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregation.g.cs index 23094bcfc16..e75e924bfc2 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RangeAggregation.g.cs @@ -36,16 +36,12 @@ public sealed partial class RangeAggregation public Elastic.Clients.Elasticsearch.Serverless.Field? Field { get; set; } [JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
[JsonInclude, JsonPropertyName("missing")] public int? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// An array of ranges used to bucket documents. @@ -68,9 +64,7 @@ public RangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MissingValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -110,12 +104,6 @@ public RangeAggregationDescriptor Format(string? format) return Self; } - public RangeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -125,12 +113,6 @@ public RangeAggregationDescriptor Missing(int? missing) return Self; } - public RangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// An array of ranges used to bucket documents. /// @@ -191,24 +173,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue.HasValue) { writer.WritePropertyName("missing"); writer.WriteNumberValue(MissingValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); @@ -260,9 +230,7 @@ public RangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MissingValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -302,12 +270,6 @@ public RangeAggregationDescriptor Format(string? format) return Self; } - public RangeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -317,12 +279,6 @@ public RangeAggregationDescriptor Missing(int? missing) return Self; } - public RangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// An array of ranges used to bucket documents. /// @@ -383,24 +339,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue.HasValue) { writer.WritePropertyName("missing"); writer.WriteNumberValue(MissingValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RareTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RareTermsAggregation.g.cs index 5735abfd3cb..e5e799e58cd 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RareTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/RareTermsAggregation.g.cs @@ -52,16 +52,12 @@ public sealed partial class RareTermsAggregation ///
[JsonInclude, JsonPropertyName("max_doc_count")] public long? MaxDocCount { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
[JsonInclude, JsonPropertyName("missing")] public Elastic.Clients.Elasticsearch.Serverless.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The precision of the internal CuckooFilters.
Smaller precision leads to better approximation, but higher memory usage.
@@ -86,9 +82,7 @@ public RareTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } private long? MaxDocCountValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } private double? PrecisionValue { get; set; } private string? ValueTypeValue { get; set; } @@ -146,12 +140,6 @@ public RareTermsAggregationDescriptor MaxDocCount(long? maxDocCount) return Self; } - public RareTermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -161,12 +149,6 @@ public RareTermsAggregationDescriptor Missing(Elastic.Clients.Elastic return Self; } - public RareTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The precision of the internal CuckooFilters.
Smaller precision leads to better approximation, but higher memory usage.
///
@@ -209,24 +191,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDocCountValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); @@ -255,9 +225,7 @@ public RareTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } private long? MaxDocCountValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } private double? PrecisionValue { get; set; } private string? ValueTypeValue { get; set; } @@ -315,12 +283,6 @@ public RareTermsAggregationDescriptor MaxDocCount(long? maxDocCount) return Self; } - public RareTermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -330,12 +292,6 @@ public RareTermsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Serv return Self; } - public RareTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The precision of the internal CuckooFilters.
Smaller precision leads to better approximation, but higher memory usage.
///
@@ -378,24 +334,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDocCountValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs index bec8b6bd201..3b83e415f4d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs @@ -29,11 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Aggregations; public sealed partial class ReverseNestedAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// Defines the nested object field that should be joined back to.
The default is empty, which means that it joins back to the root/main document level.
///
@@ -51,22 +46,8 @@ public ReverseNestedAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - public ReverseNestedAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ReverseNestedAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Defines the nested object field that should be joined back to.
The default is empty, which means that it joins back to the root/main document level.
///
@@ -97,18 +78,6 @@ public ReverseNestedAggregationDescriptor Path(Expression? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? PathValue { get; set; } - public ReverseNestedAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ReverseNestedAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Defines the nested object field that should be joined back to.
The default is empty, which means that it joins back to the root/main document level.
///
@@ -173,18 +128,6 @@ public ReverseNestedAggregationDescriptor Path(Expression? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// Limits how many top-scoring documents are collected in the sample processed on each shard. /// @@ -51,22 +46,8 @@ public SamplerAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? ShardSizeValue { get; set; } - public SamplerAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SamplerAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Limits how many top-scoring documents are collected in the sample processed on each shard. /// @@ -79,18 +60,6 @@ public SamplerAggregationDescriptor ShardSize(int? shardSize) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ShardSizeValue.HasValue) { writer.WritePropertyName("shard_size"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs index 8e4679391cd..6f091db5caf 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs @@ -52,10 +52,6 @@ public sealed partial class SerialDifferencingAggregation ///
[JsonInclude, JsonPropertyName("lag")] public int? Lag { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(SerialDifferencingAggregation serialDifferencingAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.SerialDiff(serialDifferencingAggregation); } @@ -72,8 +68,6 @@ public SerialDifferencingAggregationDescriptor() : base() private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } private int? LagValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -111,18 +105,6 @@ public SerialDifferencingAggregationDescriptor Lag(int? lag) return Self; } - public SerialDifferencingAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SerialDifferencingAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -150,18 +132,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(LagValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs index 819b490dd5e..a9cd778550b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs @@ -76,8 +76,6 @@ public sealed partial class SignificantTermsAggregation /// [JsonInclude, JsonPropertyName("jlh")] public Elastic.Clients.Elasticsearch.Serverless.EmptyObject? Jlh { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only return terms that are found in more than `min_doc_count` hits. @@ -90,8 +88,6 @@ public sealed partial class SignificantTermsAggregation /// [JsonInclude, JsonPropertyName("mutual_information")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformation { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. @@ -150,12 +146,10 @@ public SignificantTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.EmptyObject? JlhValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor JlhDescriptor { get; set; } private Action JlhDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } private Action MutualInformationDescriptorAction { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } private Action PercentageDescriptorAction { get; set; } @@ -328,12 +322,6 @@ public SignificantTermsAggregationDescriptor Jlh(Action Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return terms that are found in more than `min_doc_count` hits. /// @@ -370,12 +358,6 @@ public SignificantTermsAggregationDescriptor MutualInformation(Action return Self; } - public SignificantTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. /// @@ -548,12 +530,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, JlhValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -576,12 +552,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MutualInformationValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentageDescriptor is not null) { writer.WritePropertyName("percentage"); @@ -660,12 +630,10 @@ public SignificantTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.EmptyObject? JlhValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor JlhDescriptor { get; set; } private Action JlhDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } private Action MutualInformationDescriptorAction { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } private Action PercentageDescriptorAction { get; set; } @@ -838,12 +806,6 @@ public SignificantTermsAggregationDescriptor Jlh(Action, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return terms that are found in more than `min_doc_count` hits. /// @@ -880,12 +842,6 @@ public SignificantTermsAggregationDescriptor MutualInformation(Action /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. /// @@ -1058,12 +1014,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, JlhValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -1086,12 +1036,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MutualInformationValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentageDescriptor is not null) { writer.WritePropertyName("percentage"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs index a8653ec6ba8..adbc2b53998 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs @@ -82,8 +82,6 @@ public sealed partial class SignificantTextAggregation ///
[JsonInclude, JsonPropertyName("jlh")] public Elastic.Clients.Elasticsearch.Serverless.EmptyObject? Jlh { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only return values that are found in more than `min_doc_count` hits. @@ -96,8 +94,6 @@ public sealed partial class SignificantTextAggregation /// [JsonInclude, JsonPropertyName("mutual_information")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformation { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. @@ -164,12 +160,10 @@ public SignificantTextAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.EmptyObject? JlhValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor JlhDescriptor { get; set; } private Action JlhDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } private Action MutualInformationDescriptorAction { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } private Action PercentageDescriptorAction { get; set; } @@ -352,12 +346,6 @@ public SignificantTextAggregationDescriptor Jlh(Action Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return values that are found in more than `min_doc_count` hits. /// @@ -394,12 +382,6 @@ public SignificantTextAggregationDescriptor MutualInformation(Action< return Self; } - public SignificantTextAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. /// @@ -587,12 +569,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, JlhValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -615,12 +591,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MutualInformationValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentageDescriptor is not null) { writer.WritePropertyName("percentage"); @@ -706,12 +676,10 @@ public SignificantTextAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.EmptyObject? JlhValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.EmptyObjectDescriptor JlhDescriptor { get; set; } private Action JlhDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } private Action MutualInformationDescriptorAction { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } private Action PercentageDescriptorAction { get; set; } @@ -894,12 +862,6 @@ public SignificantTextAggregationDescriptor Jlh(Action, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return values that are found in more than `min_doc_count` hits. /// @@ -936,12 +898,6 @@ public SignificantTextAggregationDescriptor MutualInformation(Action /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. /// @@ -1129,12 +1085,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, JlhValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -1157,12 +1107,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MutualInformationValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentageDescriptor is not null) { writer.WritePropertyName("percentage"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs index b46fa067e4e..aaaa57c420d 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class StatsBucketAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(StatsBucketAggregation statsBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.StatsBucket(statsBucketAggregation); } @@ -65,8 +61,6 @@ public StatsBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public StatsBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch. return Self; } - public StatsBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public StatsBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumBucketAggregation.g.cs index 73ff221853e..0f3275e662b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SumBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class SumBucketAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(SumBucketAggregation sumBucketAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.SumBucket(sumBucketAggregation); } @@ -65,8 +61,6 @@ public SumBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public SumBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Se return Self; } - public SumBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SumBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregation.g.cs index a7879d62ef4..4c20ff006ed 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TTestAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class TTestAggregation /// [JsonInclude, JsonPropertyName("b")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? b { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The type of test. @@ -68,8 +64,6 @@ public TTestAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? bValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor bDescriptor { get; set; } private Action> bDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestType? TypeValue { get; set; } /// @@ -126,18 +120,6 @@ public TTestAggregationDescriptor b(Action Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TTestAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The type of test. /// @@ -182,18 +164,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, bValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (TypeValue is not null) { writer.WritePropertyName("type"); @@ -218,8 +188,6 @@ public TTestAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulation? bValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TestPopulationDescriptor bDescriptor { get; set; } private Action bDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TTestType? TypeValue { get; set; } /// @@ -276,18 +244,6 @@ public TTestAggregationDescriptor b(Action, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TTestAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The type of test. /// @@ -332,18 +288,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, bValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (TypeValue is not null) { writer.WritePropertyName("type"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TermsAggregation.g.cs index dc5ddfd9d0e..79811752991 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TermsAggregation.g.cs @@ -60,8 +60,6 @@ public sealed partial class TermsAggregation /// [JsonInclude, JsonPropertyName("include")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? Include { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only return values that are found in more than `min_doc_count` hits. @@ -78,8 +76,6 @@ public sealed partial class TermsAggregation public bool? MissingBucket { get; set; } [JsonInclude, JsonPropertyName("missing_order")] public Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrder { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
@@ -132,12 +128,10 @@ public TermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } private bool? MissingBucketValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private string? NameValue { get; set; } private ICollection>? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } @@ -214,12 +208,6 @@ public TermsAggregationDescriptor Include(Elastic.Clients.Elasticsear return Self; } - public TermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return values that are found in more than `min_doc_count` hits. /// @@ -250,12 +238,6 @@ public TermsAggregationDescriptor MissingOrder(Elastic.Clients.Elasti return Self; } - public TermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
///
@@ -346,12 +328,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -376,12 +352,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingOrderValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); @@ -436,12 +406,10 @@ public TermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.TermsInclude? IncludeValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.FieldValue? MissingValue { get; set; } private bool? MissingBucketValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private string? NameValue { get; set; } private ICollection>? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } @@ -518,12 +486,6 @@ public TermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Serverle return Self; } - public TermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return values that are found in more than `min_doc_count` hits. /// @@ -554,12 +516,6 @@ public TermsAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Ser return Self; } - public TermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
///
@@ -650,12 +606,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -680,12 +630,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingOrderValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs index a2e2aacb73f..501b879e6db 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs @@ -46,6 +46,8 @@ public sealed partial class VariableWidthHistogramAggregation ///
[JsonInclude, JsonPropertyName("initial_buffer")] public int? InitialBuffer { get; set; } + [JsonInclude, JsonPropertyName("script")] + public Elastic.Clients.Elasticsearch.Serverless.Script? Script { get; set; } /// /// The number of buckets that the coordinating node will request from each shard.
Defaults to `buckets * 50`.
@@ -67,6 +69,7 @@ public VariableWidthHistogramAggregationDescriptor() : base() private int? BucketsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private int? InitialBufferValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } /// @@ -114,6 +117,12 @@ public VariableWidthHistogramAggregationDescriptor InitialBuffer(int? return Self; } + public VariableWidthHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) + { + ScriptValue = script; + return Self; + } + /// /// The number of buckets that the coordinating node will request from each shard.
Defaults to `buckets * 50`.
///
@@ -144,6 +153,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(InitialBufferValue.Value); } + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + if (ShardSizeValue.HasValue) { writer.WritePropertyName("shard_size"); @@ -165,6 +180,7 @@ public VariableWidthHistogramAggregationDescriptor() : base() private int? BucketsValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Field? FieldValue { get; set; } private int? InitialBufferValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } /// @@ -212,6 +228,12 @@ public VariableWidthHistogramAggregationDescriptor InitialBuffer(int? initialBuf return Self; } + public VariableWidthHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Serverless.Script? script) + { + ScriptValue = script; + return Self; + } + /// /// The number of buckets that the coordinating node will request from each shard.
Defaults to `buckets * 50`.
///
@@ -242,6 +264,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(InitialBufferValue.Value); } + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + if (ShardSizeValue.HasValue) { writer.WritePropertyName("shard_size"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs index b128787becd..d0074c4e431 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class WeightedAverageAggregation ///
[JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Configuration for the field that provides the values. @@ -65,8 +61,6 @@ public WeightedAverageAggregationDescriptor() : base() } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? ValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor ValueDescriptor { get; set; } private Action> ValueDescriptorAction { get; set; } @@ -84,18 +78,6 @@ public WeightedAverageAggregationDescriptor Format(string? format) return Self; } - public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WeightedAverageAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Configuration for the field that provides the values. /// @@ -165,18 +147,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ValueDescriptor is not null) { writer.WritePropertyName("value"); @@ -228,8 +198,6 @@ public WeightedAverageAggregationDescriptor() : base() } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValue? ValueValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Aggregations.WeightedAverageValueDescriptor ValueDescriptor { get; set; } private Action ValueDescriptorAction { get; set; } @@ -247,18 +215,6 @@ public WeightedAverageAggregationDescriptor Format(string? format) return Self; } - public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WeightedAverageAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Configuration for the field that provides the values. /// @@ -328,18 +284,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ValueDescriptor is not null) { writer.WritePropertyName("value"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs index a63e47285e9..30c38662283 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs @@ -29,6 +29,9 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; public sealed partial class HtmlStripCharFilter : ICharFilter { + [JsonInclude, JsonPropertyName("escaped_tags")] + public ICollection? EscapedTags { get; set; } + [JsonInclude, JsonPropertyName("type")] public string Type => "html_strip"; @@ -44,8 +47,15 @@ public HtmlStripCharFilterDescriptor() : base() { } + private ICollection? EscapedTagsValue { get; set; } private string? VersionValue { get; set; } + public HtmlStripCharFilterDescriptor EscapedTags(ICollection? escapedTags) + { + EscapedTagsValue = escapedTags; + return Self; + } + public HtmlStripCharFilterDescriptor Version(string? version) { VersionValue = version; @@ -55,6 +65,12 @@ public HtmlStripCharFilterDescriptor Version(string? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (EscapedTagsValue is not null) + { + writer.WritePropertyName("escaped_tags"); + JsonSerializer.Serialize(writer, EscapedTagsValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("html_strip"); if (!string.IsNullOrEmpty(VersionValue)) @@ -68,6 +84,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o HtmlStripCharFilter IBuildableDescriptor.Build() => new() { + EscapedTags = EscapedTagsValue, Version = VersionValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs index d20b35ed099..98e5bfa13f1 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs @@ -39,6 +39,8 @@ public sealed partial class SynonymGraphTokenFilter : ITokenFilter public ICollection? Synonyms { get; set; } [JsonInclude, JsonPropertyName("synonyms_path")] public string? SynonymsPath { get; set; } + [JsonInclude, JsonPropertyName("synonyms_set")] + public string? SynonymsSet { get; set; } [JsonInclude, JsonPropertyName("tokenizer")] public string? Tokenizer { get; set; } @@ -64,6 +66,7 @@ public SynonymGraphTokenFilterDescriptor() : base() private bool? LenientValue { get; set; } private ICollection? SynonymsValue { get; set; } private string? SynonymsPathValue { get; set; } + private string? SynonymsSetValue { get; set; } private string? TokenizerValue { get; set; } private bool? UpdateableValue { get; set; } private string? VersionValue { get; set; } @@ -98,6 +101,12 @@ public SynonymGraphTokenFilterDescriptor SynonymsPath(string? synonymsPath) return Self; } + public SynonymGraphTokenFilterDescriptor SynonymsSet(string? synonymsSet) + { + SynonymsSetValue = synonymsSet; + return Self; + } + public SynonymGraphTokenFilterDescriptor Tokenizer(string? tokenizer) { TokenizerValue = tokenizer; @@ -149,6 +158,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SynonymsPathValue); } + if (!string.IsNullOrEmpty(SynonymsSetValue)) + { + writer.WritePropertyName("synonyms_set"); + writer.WriteStringValue(SynonymsSetValue); + } + if (!string.IsNullOrEmpty(TokenizerValue)) { writer.WritePropertyName("tokenizer"); @@ -179,6 +194,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Lenient = LenientValue, Synonyms = SynonymsValue, SynonymsPath = SynonymsPathValue, + SynonymsSet = SynonymsSetValue, Tokenizer = TokenizerValue, Updateable = UpdateableValue, Version = VersionValue diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymTokenFilter.g.cs index 9043fcfa5df..979debe0f23 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SynonymTokenFilter.g.cs @@ -39,6 +39,8 @@ public sealed partial class SynonymTokenFilter : ITokenFilter public ICollection? Synonyms { get; set; } [JsonInclude, JsonPropertyName("synonyms_path")] public string? SynonymsPath { get; set; } + [JsonInclude, JsonPropertyName("synonyms_set")] + public string? SynonymsSet { get; set; } [JsonInclude, JsonPropertyName("tokenizer")] public string? Tokenizer { get; set; } @@ -64,6 +66,7 @@ public SynonymTokenFilterDescriptor() : base() private bool? LenientValue { get; set; } private ICollection? SynonymsValue { get; set; } private string? SynonymsPathValue { get; set; } + private string? SynonymsSetValue { get; set; } private string? TokenizerValue { get; set; } private bool? UpdateableValue { get; set; } private string? VersionValue { get; set; } @@ -98,6 +101,12 @@ public SynonymTokenFilterDescriptor SynonymsPath(string? synonymsPath) return Self; } + public SynonymTokenFilterDescriptor SynonymsSet(string? synonymsSet) + { + SynonymsSetValue = synonymsSet; + return Self; + } + public SynonymTokenFilterDescriptor Tokenizer(string? tokenizer) { TokenizerValue = tokenizer; @@ -149,6 +158,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SynonymsPathValue); } + if (!string.IsNullOrEmpty(SynonymsSetValue)) + { + writer.WritePropertyName("synonyms_set"); + writer.WriteStringValue(SynonymsSetValue); + } + if (!string.IsNullOrEmpty(TokenizerValue)) { writer.WritePropertyName("tokenizer"); @@ -179,6 +194,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Lenient = LenientValue, Synonyms = SynonymsValue, SynonymsPath = SynonymsPathValue, + SynonymsSet = SynonymsSetValue, Tokenizer = TokenizerValue, Updateable = UpdateableValue, Version = VersionValue diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs index 9253f8586b1..3677729491b 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MSearch/MultisearchBody.g.cs @@ -95,7 +95,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "knn") { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); + variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -463,7 +463,7 @@ public sealed partial class MultisearchBody /// /// Defines the approximate kNN search to run. /// - public ICollection? Knn { get; set; } + public ICollection? Knn { get; set; } /// /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
@@ -574,10 +574,10 @@ public MultisearchBodyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action> KnnDescriptorAction { get; set; } - private Action>[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action> KnnDescriptorAction { get; set; } + private Action>[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -785,7 +785,7 @@ public MultisearchBodyDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public MultisearchBodyDescriptor Knn(ICollection? knn) + public MultisearchBodyDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -794,7 +794,7 @@ public MultisearchBodyDescriptor Knn(ICollection Knn(Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor descriptor) + public MultisearchBodyDescriptor Knn(Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor descriptor) { KnnValue = null; KnnDescriptorAction = null; @@ -803,7 +803,7 @@ public MultisearchBodyDescriptor Knn(Elastic.Clients.Elasticsearch.Se return Self; } - public MultisearchBodyDescriptor Knn(Action> configure) + public MultisearchBodyDescriptor Knn(Action> configure) { KnnValue = null; KnnDescriptor = null; @@ -812,7 +812,7 @@ public MultisearchBodyDescriptor Knn(Action Knn(params Action>[] configure) + public MultisearchBodyDescriptor Knn(params Action>[] configure) { KnnValue = null; KnnDescriptor = null; @@ -1259,7 +1259,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -1268,7 +1268,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -1277,7 +1277,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) @@ -1523,10 +1523,10 @@ public MultisearchBodyDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action KnnDescriptorAction { get; set; } - private Action[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action KnnDescriptorAction { get; set; } + private Action[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -1734,7 +1734,7 @@ public MultisearchBodyDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public MultisearchBodyDescriptor Knn(ICollection? knn) + public MultisearchBodyDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -1743,7 +1743,7 @@ public MultisearchBodyDescriptor Knn(ICollection configure) + public MultisearchBodyDescriptor Knn(Action configure) { KnnValue = null; KnnDescriptor = null; @@ -1761,7 +1761,7 @@ public MultisearchBodyDescriptor Knn(Action[] configure) + public MultisearchBodyDescriptor Knn(params Action[] configure) { KnnValue = null; KnnDescriptor = null; @@ -2208,7 +2208,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -2217,7 +2217,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -2226,7 +2226,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LearningToRank.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LearningToRank.g.cs new file mode 100644 index 00000000000..1d557ddb6c1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/LearningToRank.g.cs @@ -0,0 +1,89 @@ +// 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.Core.Search; + +public sealed partial class LearningToRank +{ + /// + /// The unique identifier of the trained model uploaded to Elasticsearch + /// + [JsonInclude, JsonPropertyName("model_id")] + public string ModelId { get; set; } + + /// + /// Named parameters to be passed to the query templates used for feature + /// + [JsonInclude, JsonPropertyName("params")] + public IDictionary? Params { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore(LearningToRank learningToRank) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore.LearningToRank(learningToRank); +} + +public sealed partial class LearningToRankDescriptor : SerializableDescriptor +{ + internal LearningToRankDescriptor(Action configure) => configure.Invoke(this); + + public LearningToRankDescriptor() : base() + { + } + + private string ModelIdValue { get; set; } + private IDictionary? ParamsValue { get; set; } + + /// + /// The unique identifier of the trained model uploaded to Elasticsearch + /// + public LearningToRankDescriptor ModelId(string modelId) + { + ModelIdValue = modelId; + return Self; + } + + /// + /// Named parameters to be passed to the query templates used for feature + /// + public LearningToRankDescriptor Params(Func, FluentDictionary> selector) + { + ParamsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("model_id"); + writer.WriteStringValue(ModelIdValue); + if (ParamsValue is not null) + { + writer.WritePropertyName("params"); + JsonSerializer.Serialize(writer, ParamsValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Rescore.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Rescore.g.cs index 28cd9731679..a05d61b1266 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Rescore.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/Rescore.g.cs @@ -21,18 +21,129 @@ using Elastic.Clients.Elasticsearch.Serverless.Serialization; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; using System.Text.Json; using System.Text.Json.Serialization; namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; +[JsonConverter(typeof(RescoreConverter))] public sealed partial class Rescore { - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery Query { get; set; } + internal Rescore(string variantName, object variant) + { + if (variantName is null) + throw new ArgumentNullException(nameof(variantName)); + if (variant is null) + throw new ArgumentNullException(nameof(variant)); + if (string.IsNullOrWhiteSpace(variantName)) + throw new ArgumentException("Variant name must not be empty or whitespace."); + VariantName = variantName; + Variant = variant; + } + + internal object Variant { get; } + internal string VariantName { get; } + + public static Rescore LearningToRank(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LearningToRank learningToRank) => new Rescore("learning_to_rank", learningToRank); + public static Rescore Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery rescoreQuery) => new Rescore("query", rescoreQuery); + [JsonInclude, JsonPropertyName("window_size")] public int? WindowSize { get; set; } + + public bool TryGet([NotNullWhen(true)] out T? result) where T : class + { + result = default; + if (Variant is T variant) + { + result = variant; + return true; + } + + return false; + } +} + +internal sealed partial class RescoreConverter : JsonConverter +{ + public override Rescore Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartObject) + { + throw new JsonException("Expected start token."); + } + + object? variantValue = default; + string? variantNameValue = default; + int? windowSizeValue = default; + while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) + { + if (reader.TokenType != JsonTokenType.PropertyName) + { + throw new JsonException("Expected a property name token."); + } + + if (reader.TokenType != JsonTokenType.PropertyName) + { + throw new JsonException("Expected a property name token representing the name of an Elasticsearch field."); + } + + var propertyName = reader.GetString(); + reader.Read(); + if (propertyName == "window_size") + { + windowSizeValue = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (propertyName == "learning_to_rank") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + + if (propertyName == "query") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + + throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Rescore' from the response."); + } + + var result = new Rescore(variantNameValue, variantValue); + result.WindowSize = windowSizeValue; + return result; + } + + public override void Write(Utf8JsonWriter writer, Rescore value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + if (value.WindowSize.HasValue) + { + writer.WritePropertyName("window_size"); + writer.WriteNumberValue(value.WindowSize.Value); + } + + if (value.VariantName is not null && value.Variant is not null) + { + writer.WritePropertyName(value.VariantName); + switch (value.VariantName) + { + case "learning_to_rank": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.LearningToRank)value.Variant, options); + break; + case "query": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery)value.Variant, options); + break; + } + } + + writer.WriteEndObject(); + } } public sealed partial class RescoreDescriptor : SerializableDescriptor> @@ -43,34 +154,30 @@ public RescoreDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private int? WindowSizeValue { get; set; } + private bool ContainsVariant { get; set; } + private string ContainedVariantName { get; set; } + private object Variant { get; set; } + private Descriptor Descriptor { get; set; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery query) + private RescoreDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; + ContainedVariantName = variantName; + ContainsVariant = true; + var descriptor = (T)Activator.CreateInstance(typeof(T), true); + descriptorAction?.Invoke(descriptor); + Descriptor = descriptor; return Self; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQueryDescriptor descriptor) + private RescoreDescriptor Set(object variant, string variantName) { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; + Variant = variant; + ContainedVariantName = variantName; + ContainsVariant = true; return Self; } - public RescoreDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } + private int? WindowSizeValue { get; set; } public RescoreDescriptor WindowSize(int? windowSize) { @@ -78,31 +185,33 @@ public RescoreDescriptor WindowSize(int? windowSize) return Self; } + public RescoreDescriptor LearningToRank(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LearningToRank learningToRank) => Set(learningToRank, "learning_to_rank"); + public RescoreDescriptor LearningToRank(Action configure) => Set(configure, "learning_to_rank"); + public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery rescoreQuery) => Set(rescoreQuery, "query"); + public RescoreDescriptor Query(Action> configure) => Set(configure, "query"); + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - if (WindowSizeValue.HasValue) { writer.WritePropertyName("window_size"); writer.WriteNumberValue(WindowSizeValue.Value); } + if (!string.IsNullOrEmpty(ContainedVariantName)) + { + writer.WritePropertyName(ContainedVariantName); + if (Variant is not null) + { + JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); + writer.WriteEndObject(); + return; + } + + JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); + } + writer.WriteEndObject(); } } @@ -115,34 +224,30 @@ public RescoreDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private int? WindowSizeValue { get; set; } + private bool ContainsVariant { get; set; } + private string ContainedVariantName { get; set; } + private object Variant { get; set; } + private Descriptor Descriptor { get; set; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery query) + private RescoreDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; + ContainedVariantName = variantName; + ContainsVariant = true; + var descriptor = (T)Activator.CreateInstance(typeof(T), true); + descriptorAction?.Invoke(descriptor); + Descriptor = descriptor; return Self; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQueryDescriptor descriptor) + private RescoreDescriptor Set(object variant, string variantName) { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; + Variant = variant; + ContainedVariantName = variantName; + ContainsVariant = true; return Self; } - public RescoreDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } + private int? WindowSizeValue { get; set; } public RescoreDescriptor WindowSize(int? windowSize) { @@ -150,31 +255,33 @@ public RescoreDescriptor WindowSize(int? windowSize) return Self; } + public RescoreDescriptor LearningToRank(Elastic.Clients.Elasticsearch.Serverless.Core.Search.LearningToRank learningToRank) => Set(learningToRank, "learning_to_rank"); + public RescoreDescriptor LearningToRank(Action configure) => Set(configure, "learning_to_rank"); + public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQuery rescoreQuery) => Set(rescoreQuery, "query"); + public RescoreDescriptor Query(Action configure) => Set(configure, "query"); + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreQueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - if (WindowSizeValue.HasValue) { writer.WritePropertyName("window_size"); writer.WriteNumberValue(WindowSizeValue.Value); } + if (!string.IsNullOrEmpty(ContainedVariantName)) + { + writer.WritePropertyName(ContainedVariantName); + if (Variant is not null) + { + JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); + writer.WriteEndObject(); + return; + } + + JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RescoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RescoreQuery.g.cs index b6558250941..24b5edb684e 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RescoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/RescoreQuery.g.cs @@ -52,6 +52,8 @@ public sealed partial class RescoreQuery ///
[JsonInclude, JsonPropertyName("score_mode")] public Elastic.Clients.Elasticsearch.Serverless.Core.Search.ScoreMode? ScoreMode { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore(RescoreQuery rescoreQuery) => Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore.Query(rescoreQuery); } public sealed partial class RescoreQueryDescriptor : SerializableDescriptor> 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 cfe10bf7a26..644984391d3 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 @@ -660,6 +660,8 @@ public enum RuntimeFieldType Double, [EnumMember(Value = "date")] Date, + [EnumMember(Value = "composite")] + Composite, [EnumMember(Value = "boolean")] Boolean } @@ -685,6 +687,8 @@ public override RuntimeFieldType Read(ref Utf8JsonReader reader, Type typeToConv return RuntimeFieldType.Double; case "date": return RuntimeFieldType.Date; + case "composite": + return RuntimeFieldType.Composite; case "boolean": return RuntimeFieldType.Boolean; } @@ -718,6 +722,9 @@ public override void Write(Utf8JsonWriter writer, RuntimeFieldType value, JsonSe case RuntimeFieldType.Date: writer.WriteStringValue("date"); return; + case RuntimeFieldType.Composite: + writer.WriteStringValue("composite"); + return; case RuntimeFieldType.Boolean: writer.WriteStringValue("boolean"); return; diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs index 39b479a7884..77837c6a2b1 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs @@ -30,169 +30,23 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; public sealed partial class DataStreamLifecycleRolloverConditions { [JsonInclude, JsonPropertyName("max_age")] - public string? MaxAge { get; set; } + public string? MaxAge { get; init; } [JsonInclude, JsonPropertyName("max_docs")] - public long? MaxDocs { get; set; } + public long? MaxDocs { get; init; } [JsonInclude, JsonPropertyName("max_primary_shard_docs")] - public long? MaxPrimaryShardDocs { get; set; } + public long? MaxPrimaryShardDocs { get; init; } [JsonInclude, JsonPropertyName("max_primary_shard_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxPrimaryShardSize { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxPrimaryShardSize { get; init; } [JsonInclude, JsonPropertyName("max_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSize { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSize { get; init; } [JsonInclude, JsonPropertyName("min_age")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? MinAge { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.Duration? MinAge { get; init; } [JsonInclude, JsonPropertyName("min_docs")] - public long? MinDocs { get; set; } + public long? MinDocs { get; init; } [JsonInclude, JsonPropertyName("min_primary_shard_docs")] - public long? MinPrimaryShardDocs { get; set; } + public long? MinPrimaryShardDocs { get; init; } [JsonInclude, JsonPropertyName("min_primary_shard_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinPrimaryShardSize { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinPrimaryShardSize { get; init; } [JsonInclude, JsonPropertyName("min_size")] - public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinSize { get; set; } -} - -public sealed partial class DataStreamLifecycleRolloverConditionsDescriptor : SerializableDescriptor -{ - internal DataStreamLifecycleRolloverConditionsDescriptor(Action configure) => configure.Invoke(this); - - public DataStreamLifecycleRolloverConditionsDescriptor() : base() - { - } - - private string? MaxAgeValue { get; set; } - private long? MaxDocsValue { get; set; } - private long? MaxPrimaryShardDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxPrimaryShardSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MaxSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Duration? MinAgeValue { get; set; } - private long? MinDocsValue { get; set; } - private long? MinPrimaryShardDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinPrimaryShardSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinSizeValue { get; set; } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxAge(string? maxAge) - { - MaxAgeValue = maxAge; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxPrimaryShardDocs(long? maxPrimaryShardDocs) - { - MaxPrimaryShardDocsValue = maxPrimaryShardDocs; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxPrimaryShardSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxPrimaryShardSize) - { - MaxPrimaryShardSizeValue = maxPrimaryShardSize; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? maxSize) - { - MaxSizeValue = maxSize; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinAge(Elastic.Clients.Elasticsearch.Serverless.Duration? minAge) - { - MinAgeValue = minAge; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinDocs(long? minDocs) - { - MinDocsValue = minDocs; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinPrimaryShardDocs(long? minPrimaryShardDocs) - { - MinPrimaryShardDocsValue = minPrimaryShardDocs; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinPrimaryShardSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? minPrimaryShardSize) - { - MinPrimaryShardSizeValue = minPrimaryShardSize; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinSize(Elastic.Clients.Elasticsearch.Serverless.ByteSize? minSize) - { - MinSizeValue = minSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(MaxAgeValue)) - { - writer.WritePropertyName("max_age"); - writer.WriteStringValue(MaxAgeValue); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (MaxPrimaryShardDocsValue.HasValue) - { - writer.WritePropertyName("max_primary_shard_docs"); - writer.WriteNumberValue(MaxPrimaryShardDocsValue.Value); - } - - if (MaxPrimaryShardSizeValue is not null) - { - writer.WritePropertyName("max_primary_shard_size"); - JsonSerializer.Serialize(writer, MaxPrimaryShardSizeValue, options); - } - - if (MaxSizeValue is not null) - { - writer.WritePropertyName("max_size"); - JsonSerializer.Serialize(writer, MaxSizeValue, options); - } - - if (MinAgeValue is not null) - { - writer.WritePropertyName("min_age"); - JsonSerializer.Serialize(writer, MinAgeValue, options); - } - - if (MinDocsValue.HasValue) - { - writer.WritePropertyName("min_docs"); - writer.WriteNumberValue(MinDocsValue.Value); - } - - if (MinPrimaryShardDocsValue.HasValue) - { - writer.WritePropertyName("min_primary_shard_docs"); - writer.WriteNumberValue(MinPrimaryShardDocsValue.Value); - } - - if (MinPrimaryShardSizeValue is not null) - { - writer.WritePropertyName("min_primary_shard_size"); - JsonSerializer.Serialize(writer, MinPrimaryShardSizeValue, options); - } - - if (MinSizeValue is not null) - { - writer.WritePropertyName("min_size"); - JsonSerializer.Serialize(writer, MinSizeValue, options); - } - - writer.WriteEndObject(); - } + public Elastic.Clients.Elasticsearch.Serverless.ByteSize? MinSize { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs index 5a0385cd7ec..22f9fa2aea1 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs @@ -36,144 +36,17 @@ public sealed partial class DataStreamLifecycleWithRollover /// If defined, every document added to this data stream will be stored at least for this time frame.
Any time after this duration the document could be deleted.
When empty, every document in this data stream will be stored indefinitely.
///
[JsonInclude, JsonPropertyName("data_retention")] - public Elastic.Clients.Elasticsearch.Serverless.Duration? DataRetention { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.Duration? DataRetention { get; init; } /// /// The downsampling configuration to execute for the managed backing index after rollover. /// [JsonInclude, JsonPropertyName("downsampling")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; init; } /// /// The conditions which will trigger the rollover of a backing index as configured by the cluster setting `cluster.lifecycle.default.rollover`.
This property is an implementation detail and it will only be retrieved when the query param `include_defaults` is set to true.
The contents of this field are subject to change.
///
[JsonInclude, JsonPropertyName("rollover")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleRolloverConditions? Rollover { get; set; } -} - -/// -/// Data lifecycle with rollover can be used to display the configuration including the default rollover conditions,
if asked.
-///
-public sealed partial class DataStreamLifecycleWithRolloverDescriptor : SerializableDescriptor -{ - internal DataStreamLifecycleWithRolloverDescriptor(Action configure) => configure.Invoke(this); - - public DataStreamLifecycleWithRolloverDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Serverless.Duration? DataRetentionValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsampling? DownsamplingValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsamplingDescriptor DownsamplingDescriptor { get; set; } - private Action DownsamplingDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleRolloverConditions? RolloverValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleRolloverConditionsDescriptor RolloverDescriptor { get; set; } - private Action RolloverDescriptorAction { get; set; } - - /// - /// If defined, every document added to this data stream will be stored at least for this time frame.
Any time after this duration the document could be deleted.
When empty, every document in this data stream will be stored indefinitely.
- ///
- public DataStreamLifecycleWithRolloverDescriptor DataRetention(Elastic.Clients.Elasticsearch.Serverless.Duration? dataRetention) - { - DataRetentionValue = dataRetention; - return Self; - } - - /// - /// The downsampling configuration to execute for the managed backing index after rollover. - /// - public DataStreamLifecycleWithRolloverDescriptor Downsampling(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsampling? downsampling) - { - DownsamplingDescriptor = null; - DownsamplingDescriptorAction = null; - DownsamplingValue = downsampling; - return Self; - } - - public DataStreamLifecycleWithRolloverDescriptor Downsampling(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsamplingDescriptor descriptor) - { - DownsamplingValue = null; - DownsamplingDescriptorAction = null; - DownsamplingDescriptor = descriptor; - return Self; - } - - public DataStreamLifecycleWithRolloverDescriptor Downsampling(Action configure) - { - DownsamplingValue = null; - DownsamplingDescriptor = null; - DownsamplingDescriptorAction = configure; - return Self; - } - - /// - /// The conditions which will trigger the rollover of a backing index as configured by the cluster setting `cluster.lifecycle.default.rollover`.
This property is an implementation detail and it will only be retrieved when the query param `include_defaults` is set to true.
The contents of this field are subject to change.
- ///
- public DataStreamLifecycleWithRolloverDescriptor Rollover(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleRolloverConditions? rollover) - { - RolloverDescriptor = null; - RolloverDescriptorAction = null; - RolloverValue = rollover; - return Self; - } - - public DataStreamLifecycleWithRolloverDescriptor Rollover(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleRolloverConditionsDescriptor descriptor) - { - RolloverValue = null; - RolloverDescriptorAction = null; - RolloverDescriptor = descriptor; - return Self; - } - - public DataStreamLifecycleWithRolloverDescriptor Rollover(Action configure) - { - RolloverValue = null; - RolloverDescriptor = null; - RolloverDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DataRetentionValue is not null) - { - writer.WritePropertyName("data_retention"); - JsonSerializer.Serialize(writer, DataRetentionValue, options); - } - - if (DownsamplingDescriptor is not null) - { - writer.WritePropertyName("downsampling"); - JsonSerializer.Serialize(writer, DownsamplingDescriptor, options); - } - else if (DownsamplingDescriptorAction is not null) - { - writer.WritePropertyName("downsampling"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleDownsamplingDescriptor(DownsamplingDescriptorAction), options); - } - else if (DownsamplingValue is not null) - { - writer.WritePropertyName("downsampling"); - JsonSerializer.Serialize(writer, DownsamplingValue, options); - } - - if (RolloverDescriptor is not null) - { - writer.WritePropertyName("rollover"); - JsonSerializer.Serialize(writer, RolloverDescriptor, options); - } - else if (RolloverDescriptorAction is not null) - { - writer.WritePropertyName("rollover"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleRolloverConditionsDescriptor(RolloverDescriptorAction), options); - } - else if (RolloverValue is not null) - { - writer.WritePropertyName("rollover"); - JsonSerializer.Serialize(writer, RolloverValue, options); - } - - writer.WriteEndObject(); - } + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleRolloverConditions? Rollover { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs index 05abc8b3c7a..177a2048f12 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs @@ -39,7 +39,7 @@ public sealed partial class IndexSettingsLifecycle /// The name of the policy to use to manage the index. For information about how Elasticsearch applies policy changes, see Policy updates. ///
[JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Serverless.Name Name { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.Name? Name { get; set; } /// /// If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting
if you create a new index that contains old data and want to use the original creation date to calculate the index
age. Specified as a Unix epoch value in milliseconds.
@@ -71,7 +71,7 @@ public IndexSettingsLifecycleDescriptor() : base() } private bool? IndexingCompleteValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Name NameValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Name? NameValue { get; set; } private long? OriginationDateValue { get; set; } private bool? ParseOriginationDateValue { get; set; } private string? RolloverAliasValue { get; set; } @@ -91,7 +91,7 @@ public IndexSettingsLifecycleDescriptor IndexingComplete(bool? indexingComplete /// /// The name of the policy to use to manage the index. For information about how Elasticsearch applies policy changes, see Policy updates. /// - public IndexSettingsLifecycleDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name name) + public IndexSettingsLifecycleDescriptor Name(Elastic.Clients.Elasticsearch.Serverless.Name? name) { NameValue = name; return Self; @@ -157,8 +157,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IndexingCompleteValue.Value); } - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); + if (NameValue is not null) + { + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); + } + if (OriginationDateValue.HasValue) { writer.WritePropertyName("origination_date"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplate.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplate.g.cs index 125f4e68d19..7a0e3603a24 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplate.g.cs @@ -30,433 +30,48 @@ namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; public sealed partial class IndexTemplate { [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; set; } + public bool? AllowAutoCreate { get; init; } /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
[JsonInclude, JsonPropertyName("composed_of")] - public ICollection ComposedOf { get; set; } + public IReadOnlyCollection ComposedOf { get; init; } /// /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
///
[JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfiguration? DataStream { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfiguration? DataStream { get; init; } /// /// Name of the index template. /// [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Serverless.Names IndexPatterns { get; set; } + [SingleOrManyCollectionConverter(typeof(string))] + public IReadOnlyCollection IndexPatterns { get; init; } /// /// Optional user metadata about the index template. May have any contents.
This map is not automatically generated by Elasticsearch.
///
[JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } + public IReadOnlyDictionary? Meta { get; init; } /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
[JsonInclude, JsonPropertyName("priority")] - public long? Priority { get; set; } + public long? Priority { get; init; } /// /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
///
[JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummary? Template { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummary? Template { get; init; } /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
[JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } -} - -public sealed partial class IndexTemplateDescriptor : SerializableDescriptor> -{ - internal IndexTemplateDescriptor(Action> configure) => configure.Invoke(this); - - public IndexTemplateDescriptor() : base() - { - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfiguration? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Names IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummary? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummaryDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - public IndexTemplateDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- public IndexTemplateDescriptor ComposedOf(ICollection composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfiguration? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public IndexTemplateDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// Name of the index template. - /// - public IndexTemplateDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Names indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// Optional user metadata about the index template. May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Priority(long? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummary? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummaryDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public IndexTemplateDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummaryDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexTemplateDescriptor : SerializableDescriptor -{ - internal IndexTemplateDescriptor(Action configure) => configure.Invoke(this); - - public IndexTemplateDescriptor() : base() - { - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfiguration? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Names IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummary? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummaryDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - public IndexTemplateDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- public IndexTemplateDescriptor ComposedOf(ICollection composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfiguration? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public IndexTemplateDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// Name of the index template. - /// - public IndexTemplateDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Serverless.Names indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// Optional user metadata about the index template. May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Priority(long? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummary? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummaryDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public IndexTemplateDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexTemplateSummaryDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } + public long? Version { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs index 588fb446173..fc932e82b63 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs @@ -33,59 +33,11 @@ public sealed partial class IndexTemplateDataStreamConfiguration /// If true, the data stream supports custom routing. ///
[JsonInclude, JsonPropertyName("allow_custom_routing")] - public bool? AllowCustomRouting { get; set; } + public bool? AllowCustomRouting { get; init; } /// /// If true, the data stream is hidden. /// [JsonInclude, JsonPropertyName("hidden")] - public bool? Hidden { get; set; } -} - -public sealed partial class IndexTemplateDataStreamConfigurationDescriptor : SerializableDescriptor -{ - internal IndexTemplateDataStreamConfigurationDescriptor(Action configure) => configure.Invoke(this); - - public IndexTemplateDataStreamConfigurationDescriptor() : base() - { - } - - private bool? AllowCustomRoutingValue { get; set; } - private bool? HiddenValue { get; set; } - - /// - /// If true, the data stream supports custom routing. - /// - public IndexTemplateDataStreamConfigurationDescriptor AllowCustomRouting(bool? allowCustomRouting = true) - { - AllowCustomRoutingValue = allowCustomRouting; - return Self; - } - - /// - /// If true, the data stream is hidden. - /// - public IndexTemplateDataStreamConfigurationDescriptor Hidden(bool? hidden = true) - { - HiddenValue = hidden; - return Self; - } - - 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"); - writer.WriteBooleanValue(HiddenValue.Value); - } - - writer.WriteEndObject(); - } + public bool? Hidden { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs index d69020dafbf..63f12296520 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs @@ -33,353 +33,20 @@ public sealed partial class IndexTemplateSummary /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
///
[JsonInclude, JsonPropertyName("aliases")] - public IDictionary? Aliases { get; set; } + [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Alias))] + public IReadOnlyDictionary? Aliases { get; init; } [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } /// /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
///
[JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Mappings { get; set; } + public Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? Mappings { get; init; } /// /// Configuration options for the index. /// [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; set; } -} - -public sealed partial class IndexTemplateSummaryDescriptor : SerializableDescriptor> -{ - internal IndexTemplateSummaryDescriptor(Action> configure) => configure.Invoke(this); - - public IndexTemplateSummaryDescriptor() : base() - { - } - - private IDictionary> AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRolloverDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { 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 Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action> SettingsDescriptorAction { get; set; } - - /// - /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
- ///
- public IndexTemplateSummaryDescriptor Aliases(Func>, FluentDescriptorDictionary>> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRolloverDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - /// - /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
- ///
- public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Mappings(Action> configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// Configuration options for the index. - /// - public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Settings(Action> configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - 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 (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRolloverDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, 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 (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); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexTemplateSummaryDescriptor : SerializableDescriptor -{ - internal IndexTemplateSummaryDescriptor(Action configure) => configure.Invoke(this); - - public IndexTemplateSummaryDescriptor() : base() - { - } - - private IDictionary AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRolloverDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { 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 Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - - /// - /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
- ///
- public IndexTemplateSummaryDescriptor Aliases(Func, FluentDescriptorDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRollover? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRolloverDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - /// - /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
- ///
- public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Mappings(Action configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// Configuration options for the index. - /// - public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - 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 (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.DataStreamLifecycleWithRolloverDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, 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 (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); - } - - writer.WriteEndObject(); - } + public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnQuery.g.cs index 92dd32aeca2..17d32c7a5ea 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnQuery.g.cs @@ -30,7 +30,7 @@ namespace Elastic.Clients.Elasticsearch.Serverless; public sealed partial class KnnQuery { /// - /// Boost value to apply to kNN scores + /// Floating point number used to decrease or increase the relevance scores of the query.
Boost values are relative to the default value of 1.0.
A boost value between 0 and 1.0 decreases the relevance score.
A value greater than 1.0 increases the relevance score.
///
[JsonInclude, JsonPropertyName("boost")] public float? Boost { get; set; } @@ -48,23 +48,13 @@ public sealed partial class KnnQuery [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] public ICollection? Filter { get; set; } - /// - /// If defined, each search hit will contain inner hits. - /// - [JsonInclude, JsonPropertyName("inner_hits")] - public Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHits { get; set; } - - /// - /// The final number of nearest neighbors to return as top hits - /// - [JsonInclude, JsonPropertyName("k")] - public long k { get; set; } - /// /// The number of nearest neighbor candidates to consider per shard /// [JsonInclude, JsonPropertyName("num_candidates")] - public long NumCandidates { get; set; } + public long? NumCandidates { get; set; } + [JsonInclude, JsonPropertyName("_name")] + public string? QueryName { get; set; } /// /// The query vector @@ -101,11 +91,8 @@ public KnnQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private Action>[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } - private long kValue { get; set; } - private long NumCandidatesValue { get; set; } + private long? NumCandidatesValue { get; set; } + private string? QueryNameValue { get; set; } private ICollection? QueryVectorValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } @@ -113,7 +100,7 @@ public KnnQueryDescriptor() : base() private float? SimilarityValue { get; set; } /// - /// Boost value to apply to kNN scores + /// Floating point number used to decrease or increase the relevance scores of the query.
Boost values are relative to the default value of 1.0.
A boost value between 0 and 1.0 decreases the relevance score.
A value greater than 1.0 increases the relevance score.
///
public KnnQueryDescriptor Boost(float? boost) { @@ -188,47 +175,17 @@ public KnnQueryDescriptor Filter(params Action - /// If defined, each search hit will contain inner hits. - ///
- public KnnQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public KnnQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public KnnQueryDescriptor InnerHits(Action> configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// The final number of nearest neighbors to return as top hits + /// The number of nearest neighbor candidates to consider per shard /// - public KnnQueryDescriptor k(long k) + public KnnQueryDescriptor NumCandidates(long? numCandidates) { - kValue = k; + NumCandidatesValue = numCandidates; return Self; } - /// - /// The number of nearest neighbor candidates to consider per shard - /// - public KnnQueryDescriptor NumCandidates(long numCandidates) + public KnnQueryDescriptor QueryName(string? queryName) { - NumCandidatesValue = numCandidates; + QueryNameValue = queryName; return Self; } @@ -317,26 +274,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (InnerHitsDescriptor is not null) + if (NumCandidatesValue.HasValue) { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue.Value); } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) + + if (!string.IsNullOrEmpty(QueryNameValue)) { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); } - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue); - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue); if (QueryVectorValue is not null) { writer.WritePropertyName("query_vector"); @@ -383,11 +332,8 @@ public KnnQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private Action[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } - private long kValue { get; set; } - private long NumCandidatesValue { get; set; } + private long? NumCandidatesValue { get; set; } + private string? QueryNameValue { get; set; } private ICollection? QueryVectorValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } @@ -395,7 +341,7 @@ public KnnQueryDescriptor() : base() private float? SimilarityValue { get; set; } /// - /// Boost value to apply to kNN scores + /// Floating point number used to decrease or increase the relevance scores of the query.
Boost values are relative to the default value of 1.0.
A boost value between 0 and 1.0 decreases the relevance score.
A value greater than 1.0 increases the relevance score.
///
public KnnQueryDescriptor Boost(float? boost) { @@ -470,47 +416,17 @@ public KnnQueryDescriptor Filter(params Action - /// If defined, each search hit will contain inner hits. - ///
- public KnnQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public KnnQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public KnnQueryDescriptor InnerHits(Action configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// The final number of nearest neighbors to return as top hits + /// The number of nearest neighbor candidates to consider per shard /// - public KnnQueryDescriptor k(long k) + public KnnQueryDescriptor NumCandidates(long? numCandidates) { - kValue = k; + NumCandidatesValue = numCandidates; return Self; } - /// - /// The number of nearest neighbor candidates to consider per shard - /// - public KnnQueryDescriptor NumCandidates(long numCandidates) + public KnnQueryDescriptor QueryName(string? queryName) { - NumCandidatesValue = numCandidates; + QueryNameValue = queryName; return Self; } @@ -599,26 +515,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (InnerHitsDescriptor is not null) + if (NumCandidatesValue.HasValue) { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue.Value); } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) + + if (!string.IsNullOrEmpty(QueryNameValue)) { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); } - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue); - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue); if (QueryVectorValue is not null) { writer.WritePropertyName("query_vector"); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnSearch.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnSearch.g.cs new file mode 100644 index 00000000000..ba66c9ba49e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/KnnSearch.g.cs @@ -0,0 +1,666 @@ +// 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; + +public sealed partial class KnnSearch +{ + /// + /// Boost value to apply to kNN scores + /// + [JsonInclude, JsonPropertyName("boost")] + public float? Boost { get; set; } + + /// + /// The name of the vector field to search against + /// + [JsonInclude, JsonPropertyName("field")] + public Elastic.Clients.Elasticsearch.Serverless.Field Field { get; set; } + + /// + /// Filters for the kNN search query + /// + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] + public ICollection? Filter { get; set; } + + /// + /// If defined, each search hit will contain inner hits. + /// + [JsonInclude, JsonPropertyName("inner_hits")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHits { get; set; } + + /// + /// The final number of nearest neighbors to return as top hits + /// + [JsonInclude, JsonPropertyName("k")] + public long? k { get; set; } + + /// + /// The number of nearest neighbor candidates to consider per shard + /// + [JsonInclude, JsonPropertyName("num_candidates")] + public long? NumCandidates { get; set; } + + /// + /// The query vector + /// + [JsonInclude, JsonPropertyName("query_vector")] + public ICollection? QueryVector { get; set; } + + /// + /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. + /// + [JsonInclude, JsonPropertyName("query_vector_builder")] + public Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilder { get; set; } + + /// + /// The minimum similarity for a vector to be considered a match + /// + [JsonInclude, JsonPropertyName("similarity")] + public float? Similarity { get; set; } +} + +public sealed partial class KnnSearchDescriptor : SerializableDescriptor> +{ + internal KnnSearchDescriptor(Action> configure) => configure.Invoke(this); + + public KnnSearchDescriptor() : base() + { + } + + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private ICollection? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action> FilterDescriptorAction { get; set; } + private Action>[] FilterDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Action> InnerHitsDescriptorAction { get; set; } + private long? kValue { get; set; } + private long? NumCandidatesValue { get; set; } + private ICollection? QueryVectorValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } + private Action QueryVectorBuilderDescriptorAction { get; set; } + private float? SimilarityValue { get; set; } + + /// + /// Boost value to apply to kNN scores + /// + public KnnSearchDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// Filters for the kNN search query + /// + public KnnSearchDescriptor Filter(ICollection? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterValue = filter; + return Self; + } + + public KnnSearchDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorActions = null; + FilterDescriptorAction = configure; + return Self; + } + + public KnnSearchDescriptor Filter(params Action>[] configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = configure; + return Self; + } + + /// + /// If defined, each search hit will contain inner hits. + /// + public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) + { + InnerHitsDescriptor = null; + InnerHitsDescriptorAction = null; + InnerHitsValue = innerHits; + return Self; + } + + public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) + { + InnerHitsValue = null; + InnerHitsDescriptorAction = null; + InnerHitsDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor InnerHits(Action> configure) + { + InnerHitsValue = null; + InnerHitsDescriptor = null; + InnerHitsDescriptorAction = configure; + return Self; + } + + /// + /// The final number of nearest neighbors to return as top hits + /// + public KnnSearchDescriptor k(long? k) + { + kValue = k; + return Self; + } + + /// + /// The number of nearest neighbor candidates to consider per shard + /// + public KnnSearchDescriptor NumCandidates(long? numCandidates) + { + NumCandidatesValue = numCandidates; + return Self; + } + + /// + /// The query vector + /// + public KnnSearchDescriptor QueryVector(ICollection? queryVector) + { + QueryVectorValue = queryVector; + return Self; + } + + /// + /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. + /// + public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? queryVectorBuilder) + { + QueryVectorBuilderDescriptor = null; + QueryVectorBuilderDescriptorAction = null; + QueryVectorBuilderValue = queryVectorBuilder; + return Self; + } + + public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor descriptor) + { + QueryVectorBuilderValue = null; + QueryVectorBuilderDescriptorAction = null; + QueryVectorBuilderDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor QueryVectorBuilder(Action configure) + { + QueryVectorBuilderValue = null; + QueryVectorBuilderDescriptor = null; + QueryVectorBuilderDescriptorAction = configure; + return Self; + } + + /// + /// The minimum similarity for a vector to be considered a match + /// + public KnnSearchDescriptor Similarity(float? similarity) + { + SimilarityValue = similarity; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterDescriptorActions is not null) + { + writer.WritePropertyName("filter"); + if (FilterDescriptorActions.Length != 1) + writer.WriteStartArray(); + foreach (var action in FilterDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); + } + + if (FilterDescriptorActions.Length != 1) + writer.WriteEndArray(); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); + } + + if (InnerHitsDescriptor is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); + } + else if (InnerHitsDescriptorAction is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); + } + else if (InnerHitsValue is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, InnerHitsValue, options); + } + + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + if (NumCandidatesValue.HasValue) + { + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue.Value); + } + + if (QueryVectorValue is not null) + { + writer.WritePropertyName("query_vector"); + JsonSerializer.Serialize(writer, QueryVectorValue, options); + } + + if (QueryVectorBuilderDescriptor is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); + } + else if (QueryVectorBuilderDescriptorAction is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); + } + else if (QueryVectorBuilderValue is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); + } + + if (SimilarityValue.HasValue) + { + writer.WritePropertyName("similarity"); + writer.WriteNumberValue(SimilarityValue.Value); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class KnnSearchDescriptor : SerializableDescriptor +{ + internal KnnSearchDescriptor(Action configure) => configure.Invoke(this); + + public KnnSearchDescriptor() : base() + { + } + + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Field FieldValue { get; set; } + private ICollection? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } + private Action[] FilterDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Action InnerHitsDescriptorAction { get; set; } + private long? kValue { get; set; } + private long? NumCandidatesValue { get; set; } + private ICollection? QueryVectorValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } + private Action QueryVectorBuilderDescriptorAction { get; set; } + private float? SimilarityValue { get; set; } + + /// + /// Boost value to apply to kNN scores + /// + public KnnSearchDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Elastic.Clients.Elasticsearch.Serverless.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// Filters for the kNN search query + /// + public KnnSearchDescriptor Filter(ICollection? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterValue = filter; + return Self; + } + + public KnnSearchDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorActions = null; + FilterDescriptorAction = configure; + return Self; + } + + public KnnSearchDescriptor Filter(params Action[] configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = configure; + return Self; + } + + /// + /// If defined, each search hit will contain inner hits. + /// + public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHits? innerHits) + { + InnerHitsDescriptor = null; + InnerHitsDescriptorAction = null; + InnerHitsValue = innerHits; + return Self; + } + + public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor descriptor) + { + InnerHitsValue = null; + InnerHitsDescriptorAction = null; + InnerHitsDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor InnerHits(Action configure) + { + InnerHitsValue = null; + InnerHitsDescriptor = null; + InnerHitsDescriptorAction = configure; + return Self; + } + + /// + /// The final number of nearest neighbors to return as top hits + /// + public KnnSearchDescriptor k(long? k) + { + kValue = k; + return Self; + } + + /// + /// The number of nearest neighbor candidates to consider per shard + /// + public KnnSearchDescriptor NumCandidates(long? numCandidates) + { + NumCandidatesValue = numCandidates; + return Self; + } + + /// + /// The query vector + /// + public KnnSearchDescriptor QueryVector(ICollection? queryVector) + { + QueryVectorValue = queryVector; + return Self; + } + + /// + /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. + /// + public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilder? queryVectorBuilder) + { + QueryVectorBuilderDescriptor = null; + QueryVectorBuilderDescriptorAction = null; + QueryVectorBuilderValue = queryVectorBuilder; + return Self; + } + + public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor descriptor) + { + QueryVectorBuilderValue = null; + QueryVectorBuilderDescriptorAction = null; + QueryVectorBuilderDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor QueryVectorBuilder(Action configure) + { + QueryVectorBuilderValue = null; + QueryVectorBuilderDescriptor = null; + QueryVectorBuilderDescriptorAction = configure; + return Self; + } + + /// + /// The minimum similarity for a vector to be considered a match + /// + public KnnSearchDescriptor Similarity(float? similarity) + { + SimilarityValue = similarity; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterDescriptorActions is not null) + { + writer.WritePropertyName("filter"); + if (FilterDescriptorActions.Length != 1) + writer.WriteStartArray(); + foreach (var action in FilterDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); + } + + if (FilterDescriptorActions.Length != 1) + writer.WriteEndArray(); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); + } + + if (InnerHitsDescriptor is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); + } + else if (InnerHitsDescriptorAction is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); + } + else if (InnerHitsValue is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, InnerHitsValue, options); + } + + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + if (NumCandidatesValue.HasValue) + { + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue.Value); + } + + if (QueryVectorValue is not null) + { + writer.WritePropertyName("query_vector"); + JsonSerializer.Serialize(writer, QueryVectorValue, options); + } + + if (QueryVectorBuilderDescriptor is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); + } + else if (QueryVectorBuilderDescriptorAction is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); + } + else if (QueryVectorBuilderValue is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); + } + + if (SimilarityValue.HasValue) + { + writer.WritePropertyName("similarity"); + writer.WriteNumberValue(SimilarityValue.Value); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicProperty.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicProperty.g.cs index 423ce47c30f..d3f0ac36bf4 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/DynamicProperty.g.cs @@ -98,7 +98,7 @@ public sealed partial class DynamicProperty : IProperty public Elastic.Clients.Elasticsearch.Serverless.Mapping.TimeSeriesMetricType? TimeSeriesMetric { get; set; } [JsonInclude, JsonPropertyName("type")] - public string Type => "{dynamic_property}"; + public string Type => "{dynamic_type}"; } public sealed partial class DynamicPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor @@ -578,7 +578,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } writer.WritePropertyName("type"); - writer.WriteStringValue("{dynamic_property}"); + writer.WriteStringValue("{dynamic_type}"); writer.WriteEndObject(); } @@ -1119,7 +1119,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } writer.WritePropertyName("type"); - writer.WriteStringValue("{dynamic_property}"); + writer.WriteStringValue("{dynamic_type}"); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs index 4d58c5229a3..6f2b9a7831a 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Mapping/Properties.g.cs @@ -341,7 +341,7 @@ public override IProperty Read(ref Utf8JsonReader reader, Type typeToConvert, Js return JsonSerializer.Deserialize(ref reader, options); case "double_range": return JsonSerializer.Deserialize(ref reader, options); - case "{dynamic_property}": + case "{dynamic_type}": return JsonSerializer.Deserialize(ref reader, options); case "alias": return JsonSerializer.Deserialize(ref reader, options); @@ -462,7 +462,7 @@ public override void Write(Utf8JsonWriter writer, IProperty value, JsonSerialize case "double_range": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.DoubleRangeProperty), options); return; - case "{dynamic_property}": + case "{dynamic_type}": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Serverless.Mapping.DynamicProperty), options); return; case "alias": diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryCacheStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryCacheStats.g.cs index dabe0fcb06c..39f43ffaafd 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryCacheStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryCacheStats.g.cs @@ -33,25 +33,25 @@ public sealed partial class QueryCacheStats /// Total number of entries added to the query cache across all shards assigned to selected nodes.
This number includes current and evicted entries.
///
[JsonInclude, JsonPropertyName("cache_count")] - public int CacheCount { get; init; } + public long CacheCount { get; init; } /// /// Total number of entries currently in the query cache across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("cache_size")] - public int CacheSize { get; init; } + public long CacheSize { get; init; } /// /// Total number of query cache evictions across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("evictions")] - public int Evictions { get; init; } + public long Evictions { get; init; } /// /// Total count of query cache hits across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("hit_count")] - public int HitCount { get; init; } + public long HitCount { get; init; } /// /// Total amount of memory used for the query cache across all shards assigned to selected nodes. @@ -69,11 +69,11 @@ public sealed partial class QueryCacheStats /// Total count of query cache misses across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("miss_count")] - public int MissCount { get; init; } + public long MissCount { get; init; } /// /// Total count of hits and misses in the query cache across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("total_count")] - public int TotalCount { get; init; } + public long TotalCount { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs index 356de3ae9c2..6bdf1592980 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/LikeDocument.g.cs @@ -49,6 +49,10 @@ public sealed partial class LikeDocument ///
[JsonInclude, JsonPropertyName("_index")] public Elastic.Clients.Elasticsearch.Serverless.IndexName? Index { get; set; } + + /// + /// Overrides the default analyzer. + /// [JsonInclude, JsonPropertyName("per_field_analyzer")] public IDictionary? PerFieldAnalyzer { get; set; } [JsonInclude, JsonPropertyName("routing")] @@ -109,6 +113,9 @@ public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.Ser return Self; } + /// + /// Overrides the default analyzer. + /// public LikeDocumentDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) { PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); @@ -238,6 +245,9 @@ public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.Ind return Self; } + /// + /// Overrides the default analyzer. + /// public LikeDocumentDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) { PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs index 6e9d0cde6dd..65aae628c9f 100644 --- a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs @@ -114,12 +114,6 @@ public sealed partial class MoreLikeThisQuery ///
[JsonInclude, JsonPropertyName("min_word_length")] public int? MinWordLength { get; set; } - - /// - /// Overrides the default analyzer. - /// - [JsonInclude, JsonPropertyName("per_field_analyzer")] - public IDictionary? PerFieldAnalyzer { get; set; } [JsonInclude, JsonPropertyName("_name")] public string? QueryName { get; set; } [JsonInclude, JsonPropertyName("routing")] @@ -168,7 +162,6 @@ public MoreLikeThisQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private int? MinTermFreqValue { get; set; } private int? MinWordLengthValue { get; set; } - private IDictionary? PerFieldAnalyzerValue { get; set; } private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private ICollection? StopWordsValue { get; set; } @@ -302,15 +295,6 @@ public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) return Self; } - /// - /// Overrides the default analyzer. - /// - public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) - { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public MoreLikeThisQueryDescriptor QueryName(string? queryName) { QueryNameValue = queryName; @@ -436,12 +420,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinWordLengthValue.Value); } - if (PerFieldAnalyzerValue is not null) - { - writer.WritePropertyName("per_field_analyzer"); - JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); - } - if (!string.IsNullOrEmpty(QueryNameValue)) { writer.WritePropertyName("_name"); @@ -504,7 +482,6 @@ public MoreLikeThisQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Serverless.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private int? MinTermFreqValue { get; set; } private int? MinWordLengthValue { get; set; } - private IDictionary? PerFieldAnalyzerValue { get; set; } private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Serverless.Routing? RoutingValue { get; set; } private ICollection? StopWordsValue { get; set; } @@ -638,15 +615,6 @@ public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) return Self; } - /// - /// Overrides the default analyzer. - /// - public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) - { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public MoreLikeThisQueryDescriptor QueryName(string? queryName) { QueryNameValue = queryName; @@ -772,12 +740,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinWordLengthValue.Value); } - if (PerFieldAnalyzerValue is not null) - { - writer.WritePropertyName("per_field_analyzer"); - JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); - } - if (!string.IsNullOrEmpty(QueryNameValue)) { writer.WritePropertyName("_name"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs index 69f73048c11..14e1340f92d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs @@ -248,7 +248,7 @@ public override SubmitAsyncSearchRequest Read(ref Utf8JsonReader reader, Type ty if (property == "knn") { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); + variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -836,8 +836,8 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) /// Defines the approximate kNN search to run. ///
[JsonInclude, JsonPropertyName("knn")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.KnnQuery))] - public ICollection? Knn { get; set; } + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.KnnSearch))] + public ICollection? Knn { get; set; } /// /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
@@ -1028,10 +1028,10 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Ela private Elastic.Clients.Elasticsearch.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action> KnnDescriptorAction { get; set; } - private Action>[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action> KnnDescriptorAction { get; set; } + private Action>[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -1242,7 +1242,7 @@ public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) + public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -1251,7 +1251,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(ICollection Knn(Elastic.Clients.Elasticsearch.KnnQueryDescriptor descriptor) + public SubmitAsyncSearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.KnnSearchDescriptor descriptor) { KnnValue = null; KnnDescriptorAction = null; @@ -1260,7 +1260,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(Elastic.Clients.Elastic return Self; } - public SubmitAsyncSearchRequestDescriptor Knn(Action> configure) + public SubmitAsyncSearchRequestDescriptor Knn(Action> configure) { KnnValue = null; KnnDescriptor = null; @@ -1269,7 +1269,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(Action Knn(params Action>[] configure) + public SubmitAsyncSearchRequestDescriptor Knn(params Action>[] configure) { KnnValue = null; KnnDescriptor = null; @@ -1740,7 +1740,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -1749,7 +1749,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -1758,7 +1758,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) @@ -2074,10 +2074,10 @@ public SubmitAsyncSearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Elastic.Clients.Elasticsearch.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action KnnDescriptorAction { get; set; } - private Action[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action KnnDescriptorAction { get; set; } + private Action[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -2288,7 +2288,7 @@ public SubmitAsyncSearchRequestDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) + public SubmitAsyncSearchRequestDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -2297,7 +2297,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(ICollection configure) + public SubmitAsyncSearchRequestDescriptor Knn(Action configure) { KnnValue = null; KnnDescriptor = null; @@ -2315,7 +2315,7 @@ public SubmitAsyncSearchRequestDescriptor Knn(Action[] configure) + public SubmitAsyncSearchRequestDescriptor Knn(params Action[] configure) { KnnValue = null; KnnDescriptor = null; @@ -2786,7 +2786,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -2795,7 +2795,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -2804,7 +2804,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs index dc982538524..d9343d50356 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs @@ -31,6 +31,8 @@ namespace Elastic.Clients.Elasticsearch.Cluster; public sealed partial class PutComponentTemplateRequestParameters : RequestParameters { + public string? Cause { get => Q("cause"); set => Q("cause", value); } + /// /// If `true`, this request cannot replace or update existing component templates. /// @@ -63,6 +65,9 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : ba internal override string OperationName => "cluster.put_component_template"; + [JsonIgnore] + public string? Cause { get => Q("cause"); set => Q("cause", value); } + /// /// If `true`, this request cannot replace or update existing component templates. /// @@ -76,10 +81,10 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : ba public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that
template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false` then data streams matching the template must always be explicitly created.
+ /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
///
- [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; set; } + [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } /// /// Optional user metadata about the component template.
May have any contents. This map is not automatically generated by Elasticsearch.
This information is stored in the cluster state, so keeping it short is preferable.
To unset `_meta`, replace the template without specifying this information.
@@ -123,6 +128,7 @@ public PutComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Name internal override string OperationName => "cluster.put_component_template"; + public PutComponentTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); public PutComponentTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public PutComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); @@ -132,7 +138,7 @@ public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Ela return Self; } - private bool? AllowAutoCreateValue { get; set; } + private bool? DeprecatedValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexState TemplateValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexStateDescriptor TemplateDescriptor { get; set; } @@ -140,11 +146,11 @@ public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Ela private long? VersionValue { get; set; } /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that
template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false` then data streams matching the template must always be explicitly created.
+ /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
///
- public PutComponentTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + public PutComponentTemplateRequestDescriptor Deprecated(bool? deprecated = true) { - AllowAutoCreateValue = allowAutoCreate; + DeprecatedValue = deprecated; return Self; } @@ -196,10 +202,10 @@ public PutComponentTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) + if (DeprecatedValue.HasValue) { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); } if (MetaValue is not null) @@ -257,6 +263,7 @@ public PutComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Name internal override string OperationName => "cluster.put_component_template"; + public PutComponentTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); public PutComponentTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public PutComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); @@ -266,7 +273,7 @@ public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch. return Self; } - private bool? AllowAutoCreateValue { get; set; } + private bool? DeprecatedValue { get; set; } private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexState TemplateValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexStateDescriptor TemplateDescriptor { get; set; } @@ -274,11 +281,11 @@ public PutComponentTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch. private long? VersionValue { get; set; } /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that
template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false` then data streams matching the template must always be explicitly created.
+ /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
///
- public PutComponentTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + public PutComponentTemplateRequestDescriptor Deprecated(bool? deprecated = true) { - AllowAutoCreateValue = allowAutoCreate; + DeprecatedValue = deprecated; return Self; } @@ -330,10 +337,10 @@ public PutComponentTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) + if (DeprecatedValue.HasValue) { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); } if (MetaValue is not null) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs index 46461b542a5..30aac9dbe87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs @@ -35,7 +35,7 @@ public sealed partial class CreateResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("_primary_term")] - public long PrimaryTerm { get; init; } + public long? PrimaryTerm { get; init; } [JsonInclude, JsonPropertyName("result")] public Elastic.Clients.Elasticsearch.Result Result { get; init; } [JsonInclude, JsonPropertyName("_seq_no")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs index dc66947e83e..207f8a2c3cf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs @@ -35,7 +35,7 @@ public sealed partial class DeleteResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("_primary_term")] - public long PrimaryTerm { get; init; } + public long? PrimaryTerm { get; init; } [JsonInclude, JsonPropertyName("result")] public Elastic.Clients.Elasticsearch.Result Result { get; init; } [JsonInclude, JsonPropertyName("_seq_no")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs index 217978713d3..bc547ad4e17 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs @@ -31,6 +31,11 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class GetRequestParameters : RequestParameters { + /// + /// Should this request force synthetic _source?
Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+ ///
+ public bool? ForceSyntheticSource { get => Q("force_synthetic_source"); set => Q("force_synthetic_source", value); } + /// /// Specifies the node or shard the operation should be performed on. Random by default. /// @@ -99,6 +104,12 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients internal override string OperationName => "get"; + /// + /// Should this request force synthetic _source?
Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+ ///
+ [JsonIgnore] + public bool? ForceSyntheticSource { get => Q("force_synthetic_source"); set => Q("force_synthetic_source", value); } + /// /// Specifies the node or shard the operation should be performed on. Random by default. /// @@ -179,6 +190,7 @@ public GetRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elast internal override string OperationName => "get"; + public GetRequestDescriptor ForceSyntheticSource(bool? forceSyntheticSource = true) => Qs("force_synthetic_source", forceSyntheticSource); public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); @@ -226,6 +238,7 @@ public GetRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elast internal override string OperationName => "get"; + public GetRequestDescriptor ForceSyntheticSource(bool? forceSyntheticSource = true) => Qs("force_synthetic_source", forceSyntheticSource); public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public GetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public GetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs index 7835c405fe6..f8ffe5243fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs @@ -31,10 +31,20 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class PutIndexTemplateRequestParameters : RequestParameters { + /// + /// User defined reason for creating/updating the index template + /// + 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.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } /// @@ -54,12 +64,30 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r internal override string OperationName => "indices.put_index_template"; + /// + /// User defined reason for creating/updating the index 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.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ [JsonInclude, JsonPropertyName("allow_auto_create")] + public bool? AllowAutoCreate { get; set; } + /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -72,6 +100,18 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r [JsonInclude, JsonPropertyName("data_stream")] public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStream { get; set; } + /// + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ [JsonInclude, JsonPropertyName("ignore_missing_component_templates")] + public ICollection? IgnoreMissingComponentTemplates { get; set; } + /// /// Name of the index template to create. /// @@ -88,7 +128,7 @@ public PutIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
[JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; set; } + public long? Priority { get; set; } /// /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
@@ -122,7 +162,9 @@ public PutIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Name name internal override string OperationName => "indices.put_index_template"; + public PutIndexTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); public PutIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); + public PutIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) { @@ -130,18 +172,30 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elastic return Self; } + private bool? AllowAutoCreateValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } + private long? PriorityValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } private Action> TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ public PutIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -178,6 +232,24 @@ public PutIndexTemplateRequestDescriptor DataStream(Action + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ public PutIndexTemplateRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ public PutIndexTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + /// /// Name of the index template to create. /// @@ -199,7 +271,7 @@ public PutIndexTemplateRequestDescriptor Meta(Func /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
- public PutIndexTemplateRequestDescriptor Priority(int? priority) + public PutIndexTemplateRequestDescriptor Priority(long? priority) { PriorityValue = priority; return Self; @@ -244,6 +316,12 @@ public PutIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + if (ComposedOfValue is not null) { writer.WritePropertyName("composed_of"); @@ -266,6 +344,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DataStreamValue, options); } + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + if (IndexPatternsValue is not null) { writer.WritePropertyName("index_patterns"); @@ -329,7 +419,9 @@ public PutIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Name name internal override string OperationName => "indices.put_index_template"; + public PutIndexTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause); public PutIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); + public PutIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) { @@ -337,18 +429,30 @@ public PutIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name return Self; } + private bool? AllowAutoCreateValue { get; set; } private ICollection? ComposedOfValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } + private long? PriorityValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } private Action TemplateDescriptorAction { get; set; } private long? VersionValue { get; set; } + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ public PutIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
@@ -385,6 +489,24 @@ public PutIndexTemplateRequestDescriptor DataStream(Action + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ public PutIndexTemplateRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ public PutIndexTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + /// /// Name of the index template to create. /// @@ -406,7 +528,7 @@ public PutIndexTemplateRequestDescriptor Meta(Func /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
- public PutIndexTemplateRequestDescriptor Priority(int? priority) + public PutIndexTemplateRequestDescriptor Priority(long? priority) { PriorityValue = priority; return Self; @@ -451,6 +573,12 @@ public PutIndexTemplateRequestDescriptor Version(long? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + if (ComposedOfValue is not null) { writer.WritePropertyName("composed_of"); @@ -473,6 +601,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, DataStreamValue, options); } + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + if (IndexPatternsValue is not null) { writer.WritePropertyName("index_patterns"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs index 25ba220bd25..46f7ae261b1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs @@ -31,25 +31,17 @@ namespace Elastic.Clients.Elasticsearch.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); } - /// - /// If `true`, returns settings in flat format. - /// - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", 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.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.
- ///
- public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -69,17 +61,14 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r internal override string OperationName => "indices.put_template"; - /// - /// If true, this request cannot replace or update existing index templates. - /// [JsonIgnore] - public bool? Create { get => Q("create"); set => Q("create", value); } + public string? Cause { get => Q("cause"); set => Q("cause", value); } /// - /// If `true`, returns settings in flat format. + /// If true, this request cannot replace or update existing index templates. /// [JsonIgnore] - public bool? FlatSettings { get => Q("flat_settings"); set => Q("flat_settings", value); } + 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.
@@ -87,12 +76,6 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : base(r => r [JsonIgnore] public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - /// - /// Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.
- ///
- [JsonIgnore] - public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } - /// /// Aliases for the index. /// @@ -151,10 +134,9 @@ public PutTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) : b 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 FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public PutTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutTemplateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public PutTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) { @@ -316,10 +298,9 @@ public PutTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) : b 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 FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings); public PutTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - public PutTemplateRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public PutTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs index 66fda58aec3..a7eeabab7c9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs @@ -31,18 +31,13 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class SimulateIndexTemplateRequestParameters : RequestParameters { - /// - /// If `true`, the template passed in the body is only used if no existing
templates match the same index patterns. If `false`, the simulation uses
the template with the highest priority. Note that the template is not
permanently added or updated in either case; it is only used for the
simulation.
- ///
- public bool? Create { get => Q("create"); set => Q("create", value); } - /// /// If true, returns all relevant default configurations for the index template. /// public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", 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.
+ /// 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.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } @@ -57,16 +52,10 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : b protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => true; + internal override bool SupportsBody => false; internal override string OperationName => "indices.simulate_index_template"; - /// - /// If `true`, the template passed in the body is only used if no existing
templates match the same index patterns. If `false`, the simulation uses
the template with the highest priority. Note that the template is not
permanently added or updated in either case; it is only used for the
simulation.
- ///
- [JsonIgnore] - public bool? Create { get => Q("create"); set => Q("create", value); } - /// /// If true, returns all relevant default configurations for the index template. /// @@ -74,280 +63,10 @@ public SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Name name) : b public bool? IncludeDefaults { get => Q("include_defaults"); set => Q("include_defaults", 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.
+ /// 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.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
- ///
- [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; set; } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- [JsonInclude, JsonPropertyName("composed_of")] - public ICollection? ComposedOf { get; set; } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- [JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStream { get; set; } - - /// - /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. - /// - [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Indices? IndexPatterns { get; set; } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- [JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- [JsonInclude, JsonPropertyName("priority")] - public int? Priority { get; set; } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- [JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? Template { 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; } -} - -public sealed partial class SimulateIndexTemplateRequestDescriptor : RequestDescriptor, SimulateIndexTemplateRequestParameters> -{ - internal SimulateIndexTemplateRequestDescriptor(Action> configure) => configure.Invoke(this); - - public SimulateIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) : base(r => r.Required("name", name)) - { - } - - internal override ApiUrls ApiUrls => ApiUrlLookup.IndexManagementSimulateIndexTemplate; - - protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - - internal override bool SupportsBody => true; - - internal override string OperationName => "indices.simulate_index_template"; - - public SimulateIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); - public SimulateIndexTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); - public SimulateIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); - - public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name name) - { - RouteValues.Required("name", name); - return Self; - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection? ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
- ///
- public SimulateIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- public SimulateIndexTemplateRequestDescriptor ComposedOf(ICollection? composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- public SimulateIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. - /// - public SimulateIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Indices? indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - if (ComposedOfValue is not null) - { - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - } - - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (IndexPatternsValue is not null) - { - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } } public sealed partial class SimulateIndexTemplateRequestDescriptor : RequestDescriptor @@ -362,11 +81,10 @@ public SimulateIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Name protected override HttpMethod StaticHttpMethod => HttpMethod.POST; - internal override bool SupportsBody => true; + internal override bool SupportsBody => false; internal override string OperationName => "indices.simulate_index_template"; - public SimulateIndexTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create); public SimulateIndexTemplateRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults); public SimulateIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout); @@ -376,198 +94,7 @@ public SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch return Self; } - private bool? AllowAutoCreateValue { get; set; } - private ICollection? ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private int? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - /// - /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
- ///
- public SimulateIndexTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- public SimulateIndexTemplateRequestDescriptor ComposedOf(ICollection? composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- public SimulateIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. - /// - public SimulateIndexTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Indices? indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Priority(int? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public SimulateIndexTemplateRequestDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
- ///
- public SimulateIndexTemplateRequestDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - if (ComposedOfValue is not null) - { - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - } - - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - if (IndexPatternsValue is not null) - { - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - } - - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, 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/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs index 7637c5aeb9e..1319b5304d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateResponse.g.cs @@ -28,4 +28,8 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class SimulateIndexTemplateResponse : ElasticsearchResponse { + [JsonInclude, JsonPropertyName("overlapping")] + public IReadOnlyCollection? Overlapping { get; init; } + [JsonInclude, JsonPropertyName("template")] + public Elastic.Clients.Elasticsearch.IndexManagement.Template Template { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs index b8ec9ebc9c9..1c1edb2d009 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs @@ -85,8 +85,66 @@ public SimulateTemplateRequest(Elastic.Clients.Elasticsearch.Name? name) : base( ///
[JsonIgnore] public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - [JsonIgnore] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate? Template { get; set; } + + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ [JsonInclude, JsonPropertyName("allow_auto_create")] + public bool? AllowAutoCreate { get; set; } + + /// + /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
+ ///
+ [JsonInclude, JsonPropertyName("composed_of")] + public ICollection? ComposedOf { get; set; } + + /// + /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
+ ///
+ [JsonInclude, JsonPropertyName("data_stream")] + public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStream { get; set; } + + /// + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ [JsonInclude, JsonPropertyName("deprecated")] + public bool? Deprecated { get; set; } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ [JsonInclude, JsonPropertyName("ignore_missing_component_templates")] + public ICollection? IgnoreMissingComponentTemplates { get; set; } + + /// + /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. + /// + [JsonInclude, JsonPropertyName("index_patterns")] + public Elastic.Clients.Elasticsearch.Indices? IndexPatterns { get; set; } + + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ [JsonInclude, JsonPropertyName("_meta")] + public IDictionary? Meta { get; set; } + + /// + /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
+ ///
+ [JsonInclude, JsonPropertyName("priority")] + public long? Priority { get; set; } + + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ [JsonInclude, JsonPropertyName("template")] + public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? Template { 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; } } /// @@ -122,11 +180,115 @@ public SimulateTemplateRequestDescriptor Name(Elastic.Clients.Elastic return Self; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } + private bool? AllowAutoCreateValue { get; set; } + private ICollection? ComposedOfValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } + private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } + private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } + private long? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action> TemplateDescriptorAction { get; set; } + private long? VersionValue { get; set; } + + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ public SimulateTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + + /// + /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
+ ///
+ public SimulateTemplateRequestDescriptor ComposedOf(ICollection? composedOf) + { + ComposedOfValue = composedOf; + return Self; + } + + /// + /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
+ ///
+ public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? dataStream) + { + DataStreamDescriptor = null; + DataStreamDescriptorAction = null; + DataStreamValue = dataStream; + return Self; + } + + public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor descriptor) + { + DataStreamValue = null; + DataStreamDescriptorAction = null; + DataStreamDescriptor = descriptor; + return Self; + } + + public SimulateTemplateRequestDescriptor DataStream(Action configure) + { + DataStreamValue = null; + DataStreamDescriptor = null; + DataStreamDescriptorAction = configure; + return Self; + } + + /// + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ public SimulateTemplateRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ public SimulateTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + + /// + /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. + /// + public SimulateTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Indices? indexPatterns) + { + IndexPatternsValue = indexPatterns; + return Self; + } - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate? template) + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Priority(long? priority) + { + PriorityValue = priority; + return Self; + } + + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) { TemplateDescriptor = null; TemplateDescriptorAction = null; @@ -134,7 +296,7 @@ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Ela return Self; } - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDescriptor descriptor) + public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor descriptor) { TemplateValue = null; TemplateDescriptorAction = null; @@ -142,7 +304,7 @@ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Ela return Self; } - public SimulateTemplateRequestDescriptor Template(Action> configure) + public SimulateTemplateRequestDescriptor Template(Action> configure) { TemplateValue = null; TemplateDescriptor = null; @@ -150,8 +312,99 @@ public SimulateTemplateRequestDescriptor Template(Action + /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { + writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + + if (ComposedOfValue is not null) + { + writer.WritePropertyName("composed_of"); + JsonSerializer.Serialize(writer, ComposedOfValue, options); + } + + if (DataStreamDescriptor is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamDescriptor, options); + } + else if (DataStreamDescriptorAction is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); + } + else if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + + if (IndexPatternsValue is not null) + { + writer.WritePropertyName("index_patterns"); + JsonSerializer.Serialize(writer, IndexPatternsValue, options); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PriorityValue.HasValue) + { + writer.WritePropertyName("priority"); + writer.WriteNumberValue(PriorityValue.Value); + } + + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, options); + } + + if (VersionValue.HasValue) + { + writer.WritePropertyName("version"); + writer.WriteNumberValue(VersionValue.Value); + } + + writer.WriteEndObject(); } } @@ -188,11 +441,115 @@ public SimulateTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name return Self; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } + private bool? AllowAutoCreateValue { get; set; } + private ICollection? ComposedOfValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? DataStreamValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor DataStreamDescriptor { get; set; } + private Action DataStreamDescriptorAction { get; set; } + private bool? DeprecatedValue { get; set; } + private ICollection? IgnoreMissingComponentTemplatesValue { get; set; } + private Elastic.Clients.Elasticsearch.Indices? IndexPatternsValue { get; set; } + private IDictionary? MetaValue { get; set; } + private long? PriorityValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? TemplateValue { get; set; } + private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor TemplateDescriptor { get; set; } + private Action TemplateDescriptorAction { get; set; } + private long? VersionValue { get; set; } + + /// + /// This setting overrides the value of the `action.auto_create_index` cluster setting.
If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
+ ///
+ public SimulateTemplateRequestDescriptor AllowAutoCreate(bool? allowAutoCreate = true) + { + AllowAutoCreateValue = allowAutoCreate; + return Self; + } + + /// + /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
+ ///
+ public SimulateTemplateRequestDescriptor ComposedOf(ICollection? composedOf) + { + ComposedOfValue = composedOf; + return Self; + } + + /// + /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
+ ///
+ public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility? dataStream) + { + DataStreamDescriptor = null; + DataStreamDescriptorAction = null; + DataStreamValue = dataStream; + return Self; + } + + public SimulateTemplateRequestDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor descriptor) + { + DataStreamValue = null; + DataStreamDescriptorAction = null; + DataStreamDescriptor = descriptor; + return Self; + } - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate? template) + public SimulateTemplateRequestDescriptor DataStream(Action configure) + { + DataStreamValue = null; + DataStreamDescriptor = null; + DataStreamDescriptorAction = configure; + return Self; + } + + /// + /// Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
+ ///
+ public SimulateTemplateRequestDescriptor Deprecated(bool? deprecated = true) + { + DeprecatedValue = deprecated; + return Self; + } + + /// + /// The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
+ ///
+ public SimulateTemplateRequestDescriptor IgnoreMissingComponentTemplates(ICollection? ignoreMissingComponentTemplates) + { + IgnoreMissingComponentTemplatesValue = ignoreMissingComponentTemplates; + return Self; + } + + /// + /// Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation. + /// + public SimulateTemplateRequestDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Indices? indexPatterns) + { + IndexPatternsValue = indexPatterns; + return Self; + } + + /// + /// Optional user metadata about the index template.
May have any contents.
This map is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Meta(Func, FluentDictionary> selector) + { + MetaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + /// + /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Priority(long? priority) + { + PriorityValue = priority; + return Self; + } + + /// + /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
+ ///
+ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMapping? template) { TemplateDescriptor = null; TemplateDescriptorAction = null; @@ -200,7 +557,7 @@ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch. return Self; } - public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDescriptor descriptor) + public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor descriptor) { TemplateValue = null; TemplateDescriptorAction = null; @@ -208,7 +565,7 @@ public SimulateTemplateRequestDescriptor Template(Elastic.Clients.Elasticsearch. return Self; } - public SimulateTemplateRequestDescriptor Template(Action configure) + public SimulateTemplateRequestDescriptor Template(Action configure) { TemplateValue = null; TemplateDescriptor = null; @@ -216,7 +573,98 @@ public SimulateTemplateRequestDescriptor Template(Action + /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
+ ///
+ public SimulateTemplateRequestDescriptor Version(long? version) + { + VersionValue = version; + return Self; + } + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { + writer.WriteStartObject(); + if (AllowAutoCreateValue.HasValue) + { + writer.WritePropertyName("allow_auto_create"); + writer.WriteBooleanValue(AllowAutoCreateValue.Value); + } + + if (ComposedOfValue is not null) + { + writer.WritePropertyName("composed_of"); + JsonSerializer.Serialize(writer, ComposedOfValue, options); + } + + if (DataStreamDescriptor is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamDescriptor, options); + } + else if (DataStreamDescriptorAction is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibilityDescriptor(DataStreamDescriptorAction), options); + } + else if (DataStreamValue is not null) + { + writer.WritePropertyName("data_stream"); + JsonSerializer.Serialize(writer, DataStreamValue, options); + } + + if (DeprecatedValue.HasValue) + { + writer.WritePropertyName("deprecated"); + writer.WriteBooleanValue(DeprecatedValue.Value); + } + + if (IgnoreMissingComponentTemplatesValue is not null) + { + writer.WritePropertyName("ignore_missing_component_templates"); + JsonSerializer.Serialize(writer, IgnoreMissingComponentTemplatesValue, options); + } + + if (IndexPatternsValue is not null) + { + writer.WritePropertyName("index_patterns"); + JsonSerializer.Serialize(writer, IndexPatternsValue, options); + } + + if (MetaValue is not null) + { + writer.WritePropertyName("_meta"); + JsonSerializer.Serialize(writer, MetaValue, options); + } + + if (PriorityValue.HasValue) + { + writer.WritePropertyName("priority"); + writer.WriteNumberValue(PriorityValue.Value); + } + + if (TemplateDescriptor is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateDescriptor, options); + } + else if (TemplateDescriptorAction is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateMappingDescriptor(TemplateDescriptorAction), options); + } + else if (TemplateValue is not null) + { + writer.WritePropertyName("template"); + JsonSerializer.Serialize(writer, TemplateValue, 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/_Generated/Api/IndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs index 455cc3bffd8..584b114c018 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs @@ -35,7 +35,7 @@ public sealed partial class IndexResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("_primary_term")] - public long PrimaryTerm { get; init; } + public long? PrimaryTerm { get; init; } [JsonInclude, JsonPropertyName("result")] public Elastic.Clients.Elasticsearch.Result Result { get; init; } [JsonInclude, JsonPropertyName("_seq_no")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceRequest.g.cs index 6144812f843..a46ff47b556 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceRequest.g.cs @@ -31,6 +31,10 @@ namespace Elastic.Clients.Elasticsearch.Inference; public sealed partial class InferenceRequestParameters : RequestParameters { + /// + /// Specifies the amount of time to wait for the inference request to complete. + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -54,6 +58,12 @@ public InferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType? taskTy internal override string OperationName => "inference.inference"; + /// + /// Specifies the amount of time to wait for the inference request to complete. + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + /// /// Text input to the model.
Either a string or an array of strings.
///
@@ -61,6 +71,12 @@ public InferenceRequest(Elastic.Clients.Elasticsearch.Inference.TaskType? taskTy [SingleOrManyCollectionConverter(typeof(string))] public ICollection Input { get; set; } + /// + /// Query input, required for rerank task.
Not required for other tasks.
+ ///
+ [JsonInclude, JsonPropertyName("query")] + public string? Query { get; set; } + /// /// Optional task settings /// @@ -91,6 +107,8 @@ public InferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Id inferenceId) internal override string OperationName => "inference.inference"; + public InferenceRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); + public InferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Id inferenceId) { RouteValues.Required("inference_id", inferenceId); @@ -104,6 +122,7 @@ public InferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Inferen } private ICollection InputValue { get; set; } + private string? QueryValue { get; set; } private object? TaskSettingsValue { get; set; } /// @@ -115,6 +134,15 @@ public InferenceRequestDescriptor Input(ICollection input) return Self; } + /// + /// Query input, required for rerank task.
Not required for other tasks.
+ ///
+ public InferenceRequestDescriptor Query(string? query) + { + QueryValue = query; + return Self; + } + /// /// Optional task settings /// @@ -129,6 +157,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("input"); SingleOrManySerializationHelper.Serialize(InputValue, writer, options); + if (!string.IsNullOrEmpty(QueryValue)) + { + writer.WritePropertyName("query"); + writer.WriteStringValue(QueryValue); + } + if (TaskSettingsValue is not null) { writer.WritePropertyName("task_settings"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs index 89e689fc2c7..3fefe849a02 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs @@ -31,6 +31,11 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class MultiGetRequestParameters : RequestParameters { + /// + /// Should this request force synthetic _source?
Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+ ///
+ public bool? ForceSyntheticSource { get => Q("force_synthetic_source"); set => Q("force_synthetic_source", value); } + /// /// Specifies the node or shard the operation should be performed on. Random by default. /// @@ -93,6 +98,12 @@ public MultiGetRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r internal override string OperationName => "mget"; + /// + /// Should this request force synthetic _source?
Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+ ///
+ [JsonIgnore] + public bool? ForceSyntheticSource { get => Q("force_synthetic_source"); set => Q("force_synthetic_source", value); } + /// /// Specifies the node or shard the operation should be performed on. Random by default. /// @@ -177,6 +188,7 @@ public MultiGetRequestDescriptor() internal override string OperationName => "mget"; + public MultiGetRequestDescriptor ForceSyntheticSource(bool? forceSyntheticSource = true) => Qs("force_synthetic_source", forceSyntheticSource); public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public MultiGetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public MultiGetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); @@ -313,6 +325,7 @@ public MultiGetRequestDescriptor() internal override string OperationName => "mget"; + public MultiGetRequestDescriptor ForceSyntheticSource(bool? forceSyntheticSource = true) => Qs("force_synthetic_source", forceSyntheticSource); public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); public MultiGetRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); public MultiGetRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs index 842831ae159..130cc7920b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs @@ -76,6 +76,11 @@ public sealed partial class SearchRequestParameters : RequestParameters ///
public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + /// + /// Should this request force synthetic _source?
Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+ ///
+ public bool? ForceSyntheticSource { get => Q("force_synthetic_source"); set => Q("force_synthetic_source", value); } + /// /// If `true`, concrete, expanded or aliased indices will be ignored when frozen. /// @@ -245,7 +250,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "knn") { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); + variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -673,6 +678,12 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonIgnore] public ICollection? ExpandWildcards { get => Q?>("expand_wildcards"); set => Q("expand_wildcards", value); } + /// + /// Should this request force synthetic _source?
Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
Fetches with this enabled will be slower the enabling synthetic source natively in the index.
+ ///
+ [JsonIgnore] + public bool? ForceSyntheticSource { get => Q("force_synthetic_source"); set => Q("force_synthetic_source", value); } + /// /// If `true`, concrete, expanded or aliased indices will be ignored when frozen. /// @@ -851,8 +862,8 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => /// Defines the approximate kNN search to run. ///
[JsonInclude, JsonPropertyName("knn")] - [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.KnnQuery))] - public ICollection? Knn { get; set; } + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.KnnSearch))] + public ICollection? Knn { get; set; } /// /// Minimum `_score` for matching documents.
Documents with a lower `_score` are not included in the search results.
@@ -1028,6 +1039,7 @@ public SearchRequestDescriptor() public SearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public SearchRequestDescriptor Df(string? df) => Qs("df", df); public SearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public SearchRequestDescriptor ForceSyntheticSource(bool? forceSyntheticSource = true) => Qs("force_synthetic_source", forceSyntheticSource); public SearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); public SearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); @@ -1074,10 +1086,10 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Elastic.Clients.Elasticsearch.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action> KnnDescriptorAction { get; set; } - private Action>[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action> KnnDescriptorAction { get; set; } + private Action>[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -1300,7 +1312,7 @@ public SearchRequestDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public SearchRequestDescriptor Knn(ICollection? knn) + public SearchRequestDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -1309,7 +1321,7 @@ public SearchRequestDescriptor Knn(ICollection Knn(Elastic.Clients.Elasticsearch.KnnQueryDescriptor descriptor) + public SearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.KnnSearchDescriptor descriptor) { KnnValue = null; KnnDescriptorAction = null; @@ -1318,7 +1330,7 @@ public SearchRequestDescriptor Knn(Elastic.Clients.Elasticsearch.KnnQ return Self; } - public SearchRequestDescriptor Knn(Action> configure) + public SearchRequestDescriptor Knn(Action> configure) { KnnValue = null; KnnDescriptor = null; @@ -1327,7 +1339,7 @@ public SearchRequestDescriptor Knn(Action Knn(params Action>[] configure) + public SearchRequestDescriptor Knn(params Action>[] configure) { KnnValue = null; KnnDescriptor = null; @@ -1846,7 +1858,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -1855,7 +1867,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -1864,7 +1876,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) @@ -2147,6 +2159,7 @@ public SearchRequestDescriptor() public SearchRequestDescriptor DefaultOperator(Elastic.Clients.Elasticsearch.QueryDsl.Operator? defaultOperator) => Qs("default_operator", defaultOperator); public SearchRequestDescriptor Df(string? df) => Qs("df", df); public SearchRequestDescriptor ExpandWildcards(ICollection? expandWildcards) => Qs("expand_wildcards", expandWildcards); + public SearchRequestDescriptor ForceSyntheticSource(bool? forceSyntheticSource = true) => Qs("force_synthetic_source", forceSyntheticSource); public SearchRequestDescriptor IgnoreThrottled(bool? ignoreThrottled = true) => Qs("ignore_throttled", ignoreThrottled); public SearchRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable); public SearchRequestDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); @@ -2193,10 +2206,10 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private Elastic.Clients.Elasticsearch.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action KnnDescriptorAction { get; set; } - private Action[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action KnnDescriptorAction { get; set; } + private Action[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -2419,7 +2432,7 @@ public SearchRequestDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public SearchRequestDescriptor Knn(ICollection? knn) + public SearchRequestDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -2428,7 +2441,7 @@ public SearchRequestDescriptor Knn(ICollection configure) + public SearchRequestDescriptor Knn(Action configure) { KnnValue = null; KnnDescriptor = null; @@ -2446,7 +2459,7 @@ public SearchRequestDescriptor Knn(Action[] configure) + public SearchRequestDescriptor Knn(params Action[] configure) { KnnValue = null; KnnDescriptor = null; @@ -2965,7 +2978,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -2974,7 +2987,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -2983,7 +2996,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs index 8c65132ab5c..58d6182e154 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs @@ -37,7 +37,7 @@ public sealed partial class UpdateResponse : ElasticsearchResponse [JsonInclude, JsonPropertyName("_index")] public string Index { get; init; } [JsonInclude, JsonPropertyName("_primary_term")] - public long PrimaryTerm { get; init; } + public long? PrimaryTerm { get; init; } [JsonInclude, JsonPropertyName("result")] public Elastic.Clients.Elasticsearch.Result Result { get; init; } [JsonInclude, JsonPropertyName("_seq_no")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs index 50f50696b71..575559b42df 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs @@ -8505,42 +8505,6 @@ public virtual Task SimulateIndexTemplateAsync(Si return DoRequestAsync(request, cancellationToken); } - /// - /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(SimulateIndexTemplateRequestDescriptor descriptor) - { - descriptor.BeforeRequest(); - return DoRequest, SimulateIndexTemplateResponse, SimulateIndexTemplateRequestParameters>(descriptor); - } - - /// - /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Name name) - { - var descriptor = new SimulateIndexTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequest, SimulateIndexTemplateResponse, SimulateIndexTemplateRequestParameters>(descriptor); - } - - /// - /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. - /// - [Obsolete("Synchronous methods are deprecated and could be removed in the future.")] - public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest) - { - var descriptor = new SimulateIndexTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequest, SimulateIndexTemplateResponse, SimulateIndexTemplateRequestParameters>(descriptor); - } - /// /// Simulate matching the given index name against the index templates in the system /// Learn more about this API in the Elasticsearch documentation. @@ -8577,39 +8541,6 @@ public virtual SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clien return DoRequest(descriptor); } - /// - /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(SimulateIndexTemplateRequestDescriptor descriptor, CancellationToken cancellationToken = default) - { - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateIndexTemplateResponse, SimulateIndexTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateIndexTemplateRequestDescriptor(name); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateIndexTemplateResponse, SimulateIndexTemplateRequestParameters>(descriptor, cancellationToken); - } - - /// - /// Simulate matching the given index name against the index templates in the system - /// Learn more about this API in the Elasticsearch documentation. - /// - public virtual Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, Action> configureRequest, CancellationToken cancellationToken = default) - { - var descriptor = new SimulateIndexTemplateRequestDescriptor(name); - configureRequest?.Invoke(descriptor); - descriptor.BeforeRequest(); - return DoRequestAsync, SimulateIndexTemplateResponse, SimulateIndexTemplateRequestParameters>(descriptor, cancellationToken); - } - /// /// Simulate matching the given index name against the index templates in the system /// Learn more about this API in the Elasticsearch documentation. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs index 8abb4a0d300..da02e9adcd8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AdjacencyMatrixAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class AdjacencyMatrixAggregation /// [JsonInclude, JsonPropertyName("filters")] public IDictionary? Filters { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(AdjacencyMatrixAggregation adjacencyMatrixAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.AdjacencyMatrix(adjacencyMatrixAggregation); } @@ -51,8 +47,6 @@ public AdjacencyMatrixAggregationDescriptor() : base() } private IDictionary> FiltersValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Filters used to create buckets.
At least one filter is required.
@@ -63,18 +57,6 @@ public AdjacencyMatrixAggregationDescriptor Filters(Func Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AdjacencyMatrixAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -84,18 +66,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FiltersValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } @@ -109,8 +79,6 @@ public AdjacencyMatrixAggregationDescriptor() : base() } private IDictionary FiltersValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Filters used to create buckets.
At least one filter is required.
@@ -121,18 +89,6 @@ public AdjacencyMatrixAggregationDescriptor Filters(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AdjacencyMatrixAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -142,18 +98,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FiltersValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs index c699b09f2f6..9538f13a24f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs @@ -46,8 +46,6 @@ public sealed partial class AutoDateHistogramAggregation ///
[JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The minimum rounding interval.
This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than `minimum_interval`.
@@ -60,8 +58,6 @@ public sealed partial class AutoDateHistogramAggregation ///
[JsonInclude, JsonPropertyName("missing")] public DateTimeOffset? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Time zone specified as a ISO 8601 UTC offset. @@ -93,10 +89,8 @@ public AutoDateHistogramAggregationDescriptor() : base() private int? BucketsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MinimumInterval? MinimumIntervalValue { get; set; } private DateTimeOffset? MissingValue { get; set; } - private string? NameValue { get; set; } private string? OffsetValue { get; set; } private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } @@ -147,12 +141,6 @@ public AutoDateHistogramAggregationDescriptor Format(string? format) return Self; } - public AutoDateHistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum rounding interval.
This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than `minimum_interval`.
///
@@ -171,12 +159,6 @@ public AutoDateHistogramAggregationDescriptor Missing(DateTimeOffset? return Self; } - public AutoDateHistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Time zone specified as a ISO 8601 UTC offset. /// @@ -228,12 +210,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinimumIntervalValue is not null) { writer.WritePropertyName("minimum_interval"); @@ -246,12 +222,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(OffsetValue)) { writer.WritePropertyName("offset"); @@ -291,10 +261,8 @@ public AutoDateHistogramAggregationDescriptor() : base() private int? BucketsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MinimumInterval? MinimumIntervalValue { get; set; } private DateTimeOffset? MissingValue { get; set; } - private string? NameValue { get; set; } private string? OffsetValue { get; set; } private IDictionary? ParamsValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } @@ -345,12 +313,6 @@ public AutoDateHistogramAggregationDescriptor Format(string? format) return Self; } - public AutoDateHistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum rounding interval.
This can make the collection process more efficient, as the aggregation will not attempt to round at any interval lower than `minimum_interval`.
///
@@ -369,12 +331,6 @@ public AutoDateHistogramAggregationDescriptor Missing(DateTimeOffset? missing) return Self; } - public AutoDateHistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Time zone specified as a ISO 8601 UTC offset. /// @@ -426,12 +382,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinimumIntervalValue is not null) { writer.WritePropertyName("minimum_interval"); @@ -444,12 +394,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(OffsetValue)) { writer.WritePropertyName("offset"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs index 169480b9811..6034498a3ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class AverageBucketAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(AverageBucketAggregation averageBucketAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.AvgBucket(averageBucketAggregation); } @@ -65,8 +61,6 @@ public AverageBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public AverageBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearc return Self; } - public AverageBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public AverageBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketCorrelationAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketCorrelationAggregation.g.cs index 718a01daad6..7b2858b619d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketCorrelationAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketCorrelationAggregation.g.cs @@ -43,10 +43,6 @@ public sealed partial class BucketCorrelationAggregation /// [JsonInclude, JsonPropertyName("function")] public Elastic.Clients.Elasticsearch.Aggregations.BucketCorrelationFunction Function { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(BucketCorrelationAggregation bucketCorrelationAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.BucketCorrelation(bucketCorrelationAggregation); } @@ -66,8 +62,6 @@ public BucketCorrelationAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketCorrelationFunction FunctionValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.BucketCorrelationFunctionDescriptor FunctionDescriptor { get; set; } private Action FunctionDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -105,18 +99,6 @@ public BucketCorrelationAggregationDescriptor Function(Action, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketCorrelationAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -142,18 +124,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FunctionValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketKsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketKsAggregation.g.cs index 00940edade6..bd0c4e3293c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketKsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketKsAggregation.g.cs @@ -49,10 +49,6 @@ public sealed partial class BucketKsAggregation /// [JsonInclude, JsonPropertyName("fractions")] public ICollection? Fractions { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Indicates the sampling methodology when calculating the K-S test. Note, this is sampling of the returned values.
This determines the cumulative distribution function (CDF) points used comparing the two samples. Default is
`upper_tail`, which emphasizes the upper end of the CDF points. Valid options are: `upper_tail`, `uniform`,
and `lower_tail`.
@@ -77,8 +73,6 @@ public BucketKsAggregationDescriptor() : base() private ICollection? AlternativeValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private ICollection? FractionsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private string? SamplingMethodValue { get; set; } /// @@ -108,18 +102,6 @@ public BucketKsAggregationDescriptor Fractions(ICollection? fractions) return Self; } - public BucketKsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketKsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Indicates the sampling methodology when calculating the K-S test. Note, this is sampling of the returned values.
This determines the cumulative distribution function (CDF) points used comparing the two samples. Default is
`upper_tail`, which emphasizes the upper end of the CDF points. Valid options are: `upper_tail`, `uniform`,
and `lower_tail`.
///
@@ -150,18 +132,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FractionsValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(SamplingMethodValue)) { writer.WritePropertyName("sampling_method"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs index 36e899c19a8..5be7dc751e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class BucketScriptAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The script to run for this aggregation. @@ -71,8 +67,6 @@ public BucketScriptAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } /// @@ -102,18 +96,6 @@ public BucketScriptAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch return Self; } - public BucketScriptAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketScriptAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The script to run for this aggregation. /// @@ -144,18 +126,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ScriptValue is not null) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs index fa12e440328..e2fb143bb92 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class BucketSelectorAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The script to run for this aggregation. @@ -71,8 +67,6 @@ public BucketSelectorAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } /// @@ -102,18 +96,6 @@ public BucketSelectorAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsear return Self; } - public BucketSelectorAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketSelectorAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The script to run for this aggregation. /// @@ -144,18 +126,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ScriptValue is not null) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs index 4d8788a9535..d7514003fc5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class BucketSortAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
@@ -71,8 +67,6 @@ public BucketSortAggregationDescriptor() : base() private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? SizeValue { get; set; } private ICollection? SortValue { get; set; } private Elastic.Clients.Elasticsearch.SortOptionsDescriptor SortDescriptor { get; set; } @@ -97,18 +91,6 @@ public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elas return Self; } - public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketSortAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
///
@@ -172,18 +154,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SizeValue.HasValue) { writer.WritePropertyName("size"); @@ -233,8 +203,6 @@ public BucketSortAggregationDescriptor() : base() private int? FromValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? SizeValue { get; set; } private ICollection? SortValue { get; set; } private Elastic.Clients.Elasticsearch.SortOptionsDescriptor SortDescriptor { get; set; } @@ -259,18 +227,6 @@ public BucketSortAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.A return Self; } - public BucketSortAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public BucketSortAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of buckets to return.
Defaults to all buckets of the parent aggregation.
///
@@ -334,18 +290,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SizeValue.HasValue) { writer.WritePropertyName("size"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs index bc34c26e503..8debe9bb892 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs @@ -61,16 +61,12 @@ public sealed partial class CategorizeTextAggregation ///
[JsonInclude, JsonPropertyName("max_unique_tokens")] public int? MaxUniqueTokens { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The minimum number of documents in a bucket to be returned to the results. /// [JsonInclude, JsonPropertyName("min_doc_count")] public int? MinDocCount { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The minimum number of documents in a bucket to be returned from the shard before merging. @@ -115,9 +111,7 @@ public CategorizeTextAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private int? MaxMatchedTokensValue { get; set; } private int? MaxUniqueTokensValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private int? ShardMinDocCountValue { get; set; } private int? ShardSizeValue { get; set; } private int? SimilarityThresholdValue { get; set; } @@ -186,12 +180,6 @@ public CategorizeTextAggregationDescriptor MaxUniqueTokens(int? maxUn return Self; } - public CategorizeTextAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum number of documents in a bucket to be returned to the results. /// @@ -201,12 +189,6 @@ public CategorizeTextAggregationDescriptor MinDocCount(int? minDocCou return Self; } - public CategorizeTextAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The minimum number of documents in a bucket to be returned from the shard before merging. /// @@ -272,24 +254,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxUniqueTokensValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ShardMinDocCountValue.HasValue) { writer.WritePropertyName("shard_min_doc_count"); @@ -334,9 +304,7 @@ public CategorizeTextAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private int? MaxMatchedTokensValue { get; set; } private int? MaxUniqueTokensValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private int? ShardMinDocCountValue { get; set; } private int? ShardSizeValue { get; set; } private int? SimilarityThresholdValue { get; set; } @@ -405,12 +373,6 @@ public CategorizeTextAggregationDescriptor MaxUniqueTokens(int? maxUniqueTokens) return Self; } - public CategorizeTextAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum number of documents in a bucket to be returned to the results. /// @@ -420,12 +382,6 @@ public CategorizeTextAggregationDescriptor MinDocCount(int? minDocCount) return Self; } - public CategorizeTextAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The minimum number of documents in a bucket to be returned from the shard before merging. /// @@ -491,24 +447,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxUniqueTokensValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ShardMinDocCountValue.HasValue) { writer.WritePropertyName("shard_min_doc_count"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregation.g.cs index e2bf2574932..97ff0214d1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ChildrenAggregation.g.cs @@ -29,11 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Aggregations; public sealed partial class ChildrenAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// The child type that should be selected. /// @@ -51,22 +46,8 @@ public ChildrenAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private string? TypeValue { get; set; } - public ChildrenAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ChildrenAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The child type that should be selected. /// @@ -79,18 +60,6 @@ public ChildrenAggregationDescriptor Type(string? type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(TypeValue)) { writer.WritePropertyName("type"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs index 59df8c16312..07143d83cff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class CompositeAggregation /// [JsonInclude, JsonPropertyName("after")] public IDictionary? After { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The number of composite buckets that should be returned. @@ -63,8 +59,6 @@ public CompositeAggregationDescriptor() : base() } private IDictionary? AfterValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? SizeValue { get; set; } private ICollection>? SourcesValue { get; set; } @@ -77,18 +71,6 @@ public CompositeAggregationDescriptor After(Func Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CompositeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of composite buckets that should be returned. /// @@ -116,18 +98,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, AfterValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SizeValue.HasValue) { writer.WritePropertyName("size"); @@ -153,8 +123,6 @@ public CompositeAggregationDescriptor() : base() } private IDictionary? AfterValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? SizeValue { get; set; } private ICollection>? SourcesValue { get; set; } @@ -167,18 +135,6 @@ public CompositeAggregationDescriptor After(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CompositeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of composite buckets that should be returned. /// @@ -206,18 +162,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, AfterValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SizeValue.HasValue) { writer.WritePropertyName("size"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs index ffb7b47d155..807e9178de4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class CumulativeCardinalityAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(CumulativeCardinalityAggregation cumulativeCardinalityAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.CumulativeCardinality(cumulativeCardinalityAggregation); } @@ -65,8 +61,6 @@ public CumulativeCardinalityAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public CumulativeCardinalityAggregationDescriptor GapPolicy(Elastic.Clients.Elas return Self; } - public CumulativeCardinalityAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CumulativeCardinalityAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs index 8e746c7c393..873331377a9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class CumulativeSumAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(CumulativeSumAggregation cumulativeSumAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.CumulativeSum(cumulativeSumAggregation); } @@ -65,8 +61,6 @@ public CumulativeSumAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public CumulativeSumAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearc return Self; } - public CumulativeSumAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public CumulativeSumAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs index 2b510f83b16..40f0c46e6a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs @@ -52,8 +52,6 @@ public sealed partial class DateHistogramAggregation /// [JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, all buckets between the first bucket that matches documents and the last one are returned.
@@ -66,8 +64,6 @@ public sealed partial class DateHistogramAggregation ///
[JsonInclude, JsonPropertyName("missing")] public DateTimeOffset? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Changes the start value of each bucket by the specified positive (`+`) or negative offset (`-`) duration. @@ -108,10 +104,8 @@ public DateHistogramAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? FixedIntervalValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private DateTimeOffset? MissingValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? OffsetValue { get; set; } private ICollection>? OrderValue { get; set; } private IDictionary? ParamsValue { get; set; } @@ -172,12 +166,6 @@ public DateHistogramAggregationDescriptor Format(string? format) return Self; } - public DateHistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, all buckets between the first bucket that matches documents and the last one are returned.
///
@@ -196,12 +184,6 @@ public DateHistogramAggregationDescriptor Missing(DateTimeOffset? mis return Self; } - public DateHistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Changes the start value of each bucket by the specified positive (`+`) or negative offset (`-`) duration. /// @@ -268,12 +250,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -286,12 +262,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OffsetValue is not null) { writer.WritePropertyName("offset"); @@ -338,10 +308,8 @@ public DateHistogramAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? FixedIntervalValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private DateTimeOffset? MissingValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Duration? OffsetValue { get; set; } private ICollection>? OrderValue { get; set; } private IDictionary? ParamsValue { get; set; } @@ -402,12 +370,6 @@ public DateHistogramAggregationDescriptor Format(string? format) return Self; } - public DateHistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, all buckets between the first bucket that matches documents and the last one are returned.
///
@@ -426,12 +388,6 @@ public DateHistogramAggregationDescriptor Missing(DateTimeOffset? missing) return Self; } - public DateHistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Changes the start value of each bucket by the specified positive (`+`) or negative offset (`-`) duration. /// @@ -498,12 +454,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -516,12 +466,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OffsetValue is not null) { writer.WritePropertyName("offset"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregation.g.cs index 84fcf50168e..adfb42d3aa7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateRangeAggregation.g.cs @@ -40,16 +40,12 @@ public sealed partial class DateRangeAggregation ///
[JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
[JsonInclude, JsonPropertyName("missing")] public Elastic.Clients.Elasticsearch.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Array of date ranges. @@ -76,9 +72,7 @@ public DateRangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.DateRangeExpressionDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -121,12 +115,6 @@ public DateRangeAggregationDescriptor Format(string? format) return Self; } - public DateRangeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -136,12 +124,6 @@ public DateRangeAggregationDescriptor Missing(Elastic.Clients.Elastic return Self; } - public DateRangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Array of date ranges. /// @@ -205,24 +187,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); @@ -274,9 +244,7 @@ public DateRangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.DateRangeExpressionDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -319,12 +287,6 @@ public DateRangeAggregationDescriptor Format(string? format) return Self; } - public DateRangeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -334,12 +296,6 @@ public DateRangeAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Fiel return Self; } - public DateRangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Array of date ranges. /// @@ -403,24 +359,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs index bf02a6aae98..a235397f19e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class DerivativeAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(DerivativeAggregation derivativeAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.Derivative(derivativeAggregation); } @@ -65,8 +61,6 @@ public DerivativeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public DerivativeAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.A return Self; } - public DerivativeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DerivativeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs index c12acfc481f..3615e0a409a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class DiversifiedSamplerAggregation /// [JsonInclude, JsonPropertyName("max_docs_per_value")] public int? MaxDocsPerValue { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } [JsonInclude, JsonPropertyName("script")] public Elastic.Clients.Elasticsearch.Script? Script { get; set; } @@ -73,8 +69,6 @@ public DiversifiedSamplerAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? ExecutionHintValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private int? MaxDocsPerValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } @@ -123,18 +117,6 @@ public DiversifiedSamplerAggregationDescriptor MaxDocsPerValue(int? m return Self; } - public DiversifiedSamplerAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) { ScriptValue = script; @@ -171,18 +153,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDocsPerValueValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ScriptValue is not null) { writer.WritePropertyName("script"); @@ -210,8 +180,6 @@ public DiversifiedSamplerAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? ExecutionHintValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private int? MaxDocsPerValueValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } @@ -260,18 +228,6 @@ public DiversifiedSamplerAggregationDescriptor MaxDocsPerValue(int? maxDocsPerVa return Self; } - public DiversifiedSamplerAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public DiversifiedSamplerAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - public DiversifiedSamplerAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) { ScriptValue = script; @@ -308,18 +264,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDocsPerValueValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ScriptValue is not null) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs index 07255035e2c..71f19ed653c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class ExtendedStatsBucketAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The number of standard deviations above/below the mean to display. @@ -71,8 +67,6 @@ public ExtendedStatsBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private double? SigmaValue { get; set; } /// @@ -102,18 +96,6 @@ public ExtendedStatsBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasti return Self; } - public ExtendedStatsBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ExtendedStatsBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The number of standard deviations above/below the mean to display. /// @@ -144,18 +126,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (SigmaValue.HasValue) { writer.WritePropertyName("sigma"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs index a81f2376b8f..1c905391a04 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class FiltersAggregation /// [JsonInclude, JsonPropertyName("filters")] public Elastic.Clients.Elasticsearch.Aggregations.Buckets? Filters { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters. @@ -63,8 +59,6 @@ public FiltersAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Aggregations.Buckets? FiltersValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private bool? OtherBucketValue { get; set; } private string? OtherBucketKeyValue { get; set; } @@ -77,18 +71,6 @@ public FiltersAggregationDescriptor Filters(Elastic.Clients.Elasticse return Self; } - public FiltersAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FiltersAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters. /// @@ -116,18 +98,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FiltersValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OtherBucketValue.HasValue) { writer.WritePropertyName("other_bucket"); @@ -153,8 +123,6 @@ public FiltersAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Aggregations.Buckets? FiltersValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private bool? OtherBucketValue { get; set; } private string? OtherBucketKeyValue { get; set; } @@ -167,18 +135,6 @@ public FiltersAggregationDescriptor Filters(Elastic.Clients.Elasticsearch.Aggreg return Self; } - public FiltersAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public FiltersAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters. /// @@ -206,18 +162,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FiltersValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OtherBucketValue.HasValue) { writer.WritePropertyName("other_bucket"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs index 3c5c3f6dbeb..c0ee48a89be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class GeoDistanceAggregation /// [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The origin used to evaluate the distance. @@ -76,8 +72,6 @@ public GeoDistanceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.GeoDistanceType? DistanceTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.GeoLocation? OriginValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } @@ -121,18 +115,6 @@ public GeoDistanceAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeoDistanceAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The origin used to evaluate the distance. /// @@ -205,18 +187,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OriginValue is not null) { writer.WritePropertyName("origin"); @@ -274,8 +244,6 @@ public GeoDistanceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.GeoDistanceType? DistanceTypeValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.GeoLocation? OriginValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } @@ -319,18 +287,6 @@ public GeoDistanceAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeoDistanceAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The origin used to evaluate the distance. /// @@ -403,18 +359,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OriginValue is not null) { writer.WritePropertyName("origin"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs index 03b6bfec018..1431e944bc1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class GeohashGridAggregation /// [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The string length of the geohashes used to define cells/buckets in the results. @@ -76,8 +72,6 @@ public GeohashGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.GeohashPrecision? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -118,18 +112,6 @@ public GeohashGridAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeohashGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The string length of the geohashes used to define cells/buckets in the results. /// @@ -172,18 +154,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue is not null) { writer.WritePropertyName("precision"); @@ -216,8 +186,6 @@ public GeohashGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.GeohashPrecision? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -258,18 +226,6 @@ public GeohashGridAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeohashGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The string length of the geohashes used to define cells/buckets in the results. /// @@ -312,18 +268,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue is not null) { writer.WritePropertyName("precision"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs index 60236b6e4b9..a1d3cc77361 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class GeohexGridAggregation /// [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Field Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Integer zoom of the key used to defined cells or buckets
in the results. Value should be between 0-15.
@@ -76,8 +72,6 @@ public GeohexGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -118,18 +112,6 @@ public GeohexGridAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeohexGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Integer zoom of the key used to defined cells or buckets
in the results. Value should be between 0-15.
///
@@ -168,18 +150,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); @@ -212,8 +182,6 @@ public GeohexGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -254,18 +222,6 @@ public GeohexGridAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeohexGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Integer zoom of the key used to defined cells or buckets
in the results. Value should be between 0-15.
///
@@ -304,18 +260,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WritePropertyName("field"); JsonSerializer.Serialize(writer, FieldValue, options); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs index 68c7354d28f..1e6111fa89a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class GeotileGridAggregation ///
[JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Integer zoom of the key used to define cells/buckets in the results.
Values outside of the range [0,29] will be rejected.
@@ -77,8 +73,6 @@ public GeotileGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private double? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -119,18 +113,6 @@ public GeotileGridAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeotileGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Integer zoom of the key used to define cells/buckets in the results.
Values outside of the range [0,29] will be rejected.
///
@@ -173,18 +155,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); @@ -217,8 +187,6 @@ public GeotileGridAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.GeoBounds? BoundsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private double? PrecisionValue { get; set; } private int? ShardSizeValue { get; set; } private int? SizeValue { get; set; } @@ -259,18 +227,6 @@ public GeotileGridAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GeotileGridAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Integer zoom of the key used to define cells/buckets in the results.
Values outside of the range [0,29] will be rejected.
///
@@ -313,18 +269,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregation.g.cs index 3f359d14df2..f509238c586 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GlobalAggregation.g.cs @@ -29,12 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Aggregations; public sealed partial class GlobalAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - - public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(GlobalAggregation globalAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.Global(globalAggregation); } public sealed partial class GlobalAggregationDescriptor : SerializableDescriptor @@ -45,36 +39,9 @@ public GlobalAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } - - public GlobalAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public GlobalAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs index bc9808bf7ff..03a59a92126 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs @@ -42,8 +42,6 @@ public sealed partial class HistogramAggregation ///
[JsonInclude, JsonPropertyName("interval")] public double? Interval { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, the response will fill gaps in the histogram with empty buckets.
@@ -56,8 +54,6 @@ public sealed partial class HistogramAggregation ///
[JsonInclude, JsonPropertyName("missing")] public double? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// By default, the bucket keys start with 0 and then continue in even spaced steps of `interval`.
The bucket boundaries can be shifted by using the `offset` option.
@@ -89,10 +85,8 @@ public HistogramAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } private double? IntervalValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private double? MissingValue { get; set; } - private string? NameValue { get; set; } private double? OffsetValue { get; set; } private ICollection>? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } @@ -139,12 +133,6 @@ public HistogramAggregationDescriptor Interval(double? interval) return Self; } - public HistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, the response will fill gaps in the histogram with empty buckets.
///
@@ -163,12 +151,6 @@ public HistogramAggregationDescriptor Missing(double? missing) return Self; } - public HistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// By default, the bucket keys start with 0 and then continue in even spaced steps of `interval`.
The bucket boundaries can be shifted by using the `offset` option.
///
@@ -214,12 +196,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(IntervalValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -232,12 +208,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MissingValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OffsetValue.HasValue) { writer.WritePropertyName("offset"); @@ -271,10 +241,8 @@ public HistogramAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } private double? IntervalValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private double? MissingValue { get; set; } - private string? NameValue { get; set; } private double? OffsetValue { get; set; } private ICollection>? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } @@ -321,12 +289,6 @@ public HistogramAggregationDescriptor Interval(double? interval) return Self; } - public HistogramAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only returns buckets that have `min_doc_count` number of documents.
By default, the response will fill gaps in the histogram with empty buckets.
///
@@ -345,12 +307,6 @@ public HistogramAggregationDescriptor Missing(double? missing) return Self; } - public HistogramAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// By default, the bucket keys start with 0 and then continue in even spaced steps of `interval`.
The bucket boundaries can be shifted by using the `offset` option.
///
@@ -396,12 +352,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(IntervalValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -414,12 +364,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MissingValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OffsetValue.HasValue) { writer.WritePropertyName("offset"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs index 5a7d5ef2c34..a4e7fdbc96a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs @@ -52,16 +52,12 @@ public sealed partial class InferenceAggregation ///
[JsonInclude, JsonPropertyName("inference_config")] public Elastic.Clients.Elasticsearch.Aggregations.InferenceConfig? InferenceConfig { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The ID or alias for the trained model. /// [JsonInclude, JsonPropertyName("model_id")] public Elastic.Clients.Elasticsearch.Name ModelId { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(InferenceAggregation inferenceAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.Inference(inferenceAggregation); } @@ -80,9 +76,7 @@ public InferenceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } private Action> InferenceConfigDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Name ModelIdValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -138,12 +132,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The ID or alias for the trained model. /// @@ -153,12 +141,6 @@ public InferenceAggregationDescriptor ModelId(Elastic.Clients.Elastic return Self; } - public InferenceAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -196,20 +178,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InferenceConfigValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - writer.WritePropertyName("model_id"); JsonSerializer.Serialize(writer, ModelIdValue, options); - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } @@ -228,9 +198,7 @@ public InferenceAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.InferenceConfig? InferenceConfigValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.InferenceConfigDescriptor InferenceConfigDescriptor { get; set; } private Action InferenceConfigDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Name ModelIdValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -286,12 +254,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The ID or alias for the trained model. /// @@ -301,12 +263,6 @@ public InferenceAggregationDescriptor ModelId(Elastic.Clients.Elasticsearch.Name return Self; } - public InferenceAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -344,20 +300,8 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InferenceConfigValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - writer.WritePropertyName("model_id"); JsonSerializer.Serialize(writer, ModelIdValue, options); - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs index 51d70646007..8b5080d41d0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs @@ -46,16 +46,12 @@ public sealed partial class IpPrefixAggregation /// [JsonInclude, JsonPropertyName("is_ipv6")] public bool? IsIpv6 { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Minimum number of documents in a bucket for it to be included in the response. /// [JsonInclude, JsonPropertyName("min_doc_count")] public long? MinDocCount { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Length of the network prefix. For IPv4 addresses the accepted range is [0, 32].
For IPv6 addresses the accepted range is [0, 128].
@@ -77,9 +73,7 @@ public IpPrefixAggregationDescriptor() : base() private bool? AppendPrefixLengthValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private bool? IsIpv6Value { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private int PrefixLengthValue { get; set; } /// @@ -127,12 +121,6 @@ public IpPrefixAggregationDescriptor IsIpv6(bool? isIpv6 = true) return Self; } - public IpPrefixAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Minimum number of documents in a bucket for it to be included in the response. /// @@ -142,12 +130,6 @@ public IpPrefixAggregationDescriptor MinDocCount(long? minDocCount) return Self; } - public IpPrefixAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Length of the network prefix. For IPv4 addresses the accepted range is [0, 32].
For IPv6 addresses the accepted range is [0, 128].
///
@@ -174,24 +156,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IsIpv6Value.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WritePropertyName("prefix_length"); writer.WriteNumberValue(PrefixLengthValue); writer.WriteEndObject(); @@ -209,9 +179,7 @@ public IpPrefixAggregationDescriptor() : base() private bool? AppendPrefixLengthValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } private bool? IsIpv6Value { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private int PrefixLengthValue { get; set; } /// @@ -259,12 +227,6 @@ public IpPrefixAggregationDescriptor IsIpv6(bool? isIpv6 = true) return Self; } - public IpPrefixAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Minimum number of documents in a bucket for it to be included in the response. /// @@ -274,12 +236,6 @@ public IpPrefixAggregationDescriptor MinDocCount(long? minDocCount) return Self; } - public IpPrefixAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Length of the network prefix. For IPv4 addresses the accepted range is [0, 32].
For IPv6 addresses the accepted range is [0, 128].
///
@@ -306,24 +262,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IsIpv6Value.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WritePropertyName("prefix_length"); writer.WriteNumberValue(PrefixLengthValue); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregation.g.cs index 956909112fc..5eecd393048 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpRangeAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class IpRangeAggregation ///
[JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Array of IP ranges. @@ -57,8 +53,6 @@ public IpRangeAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.IpRangeAggregationRangeDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -91,18 +85,6 @@ public IpRangeAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IpRangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Array of IP ranges. /// @@ -151,18 +133,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); @@ -207,8 +177,6 @@ public IpRangeAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.IpRangeAggregationRangeDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -241,18 +209,6 @@ public IpRangeAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public IpRangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Array of IP ranges. /// @@ -301,18 +257,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs index 92923009786..ea7e1d83c30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs @@ -35,8 +35,6 @@ public sealed partial class MatrixStatsAggregation [JsonInclude, JsonPropertyName("fields")] [JsonConverter(typeof(SingleOrManyFieldsConverter))] public Elastic.Clients.Elasticsearch.Fields? Fields { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
@@ -49,8 +47,6 @@ public sealed partial class MatrixStatsAggregation ///
[JsonInclude, JsonPropertyName("mode")] public Elastic.Clients.Elasticsearch.SortMode? Mode { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(MatrixStatsAggregation matrixStatsAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.MatrixStats(matrixStatsAggregation); } @@ -64,10 +60,8 @@ public MatrixStatsAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } - private IDictionary? MetaValue { get; set; } private IDictionary? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } - private string? NameValue { get; set; } /// /// An array of fields for computing the statistics. @@ -78,12 +72,6 @@ public MatrixStatsAggregationDescriptor Fields(Elastic.Clients.Elasti return Self; } - public MatrixStatsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -102,12 +90,6 @@ public MatrixStatsAggregationDescriptor Mode(Elastic.Clients.Elastics return Self; } - public MatrixStatsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -117,12 +99,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); @@ -135,12 +111,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ModeValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } @@ -154,10 +124,8 @@ public MatrixStatsAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Fields? FieldsValue { get; set; } - private IDictionary? MetaValue { get; set; } private IDictionary? MissingValue { get; set; } private Elastic.Clients.Elasticsearch.SortMode? ModeValue { get; set; } - private string? NameValue { get; set; } /// /// An array of fields for computing the statistics. @@ -168,12 +136,6 @@ public MatrixStatsAggregationDescriptor Fields(Elastic.Clients.Elasticsearch.Fie return Self; } - public MatrixStatsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -192,12 +154,6 @@ public MatrixStatsAggregationDescriptor Mode(Elastic.Clients.Elasticsearch.SortM return Self; } - public MatrixStatsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -207,12 +163,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldsValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); @@ -225,12 +175,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, ModeValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs index bba5b617c5e..6d6497192d4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class MaxBucketAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(MaxBucketAggregation maxBucketAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.MaxBucket(maxBucketAggregation); } @@ -65,8 +61,6 @@ public MaxBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public MaxBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Ag return Self; } - public MaxBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MaxBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs index 7d125e6a88d..a331084d307 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class MinBucketAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(MinBucketAggregation minBucketAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.MinBucket(minBucketAggregation); } @@ -65,8 +61,6 @@ public MinBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public MinBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Ag return Self; } - public MinBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MinBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregation.g.cs index 7c87406f292..e13dd5d5d01 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MissingAggregation.g.cs @@ -34,12 +34,8 @@ public sealed partial class MissingAggregation /// [JsonInclude, JsonPropertyName("field")] public Elastic.Clients.Elasticsearch.Field? Field { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } [JsonInclude, JsonPropertyName("missing")] public Elastic.Clients.Elasticsearch.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(MissingAggregation missingAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.Missing(missingAggregation); } @@ -53,9 +49,7 @@ public MissingAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } /// /// The name of the field. @@ -84,24 +78,12 @@ public MissingAggregationDescriptor Field(Expression Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public MissingAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.FieldValue? missing) { MissingValue = missing; return Self; } - public MissingAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -111,24 +93,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } @@ -142,9 +112,7 @@ public MissingAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } /// /// The name of the field. @@ -173,24 +141,12 @@ public MissingAggregationDescriptor Field(Expression, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public MissingAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.FieldValue? missing) { MissingValue = missing; return Self; } - public MissingAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -200,24 +156,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, FieldValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs index f16d0a92e24..025f1dee3dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class MovingFunctionAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The script that should be executed on each window of data. @@ -83,8 +79,6 @@ public MovingFunctionAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private string? ScriptValue { get; set; } private int? ShiftValue { get; set; } private int? WindowValue { get; set; } @@ -116,18 +110,6 @@ public MovingFunctionAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsear return Self; } - public MovingFunctionAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MovingFunctionAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The script that should be executed on each window of data. /// @@ -176,18 +158,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(ScriptValue)) { writer.WritePropertyName("script"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs index 5b8ff3e4c39..771055962a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class MovingPercentilesAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// By default, the window consists of the last n values excluding the current bucket.
Increasing `shift` by 1, moves the starting window position by 1 to the right.
@@ -77,8 +73,6 @@ public MovingPercentilesAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? ShiftValue { get; set; } private int? WindowValue { get; set; } @@ -109,18 +103,6 @@ public MovingPercentilesAggregationDescriptor GapPolicy(Elastic.Clients.Elastics return Self; } - public MovingPercentilesAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public MovingPercentilesAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// By default, the window consists of the last n values excluding the current bucket.
Increasing `shift` by 1, moves the starting window position by 1 to the right.
///
@@ -160,18 +142,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ShiftValue.HasValue) { writer.WritePropertyName("shift"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs index bbf38f75716..e411ed59a76 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs @@ -34,16 +34,12 @@ public sealed partial class MultiTermsAggregation ///
[JsonInclude, JsonPropertyName("collect_mode")] public Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? CollectMode { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The minimum number of documents in a bucket for it to be returned. /// [JsonInclude, JsonPropertyName("min_doc_count")] public long? MinDocCount { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
@@ -94,9 +90,7 @@ public MultiTermsAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private ICollection>? OrderValue { get; set; } private long? ShardMinDocCountValue { get; set; } private int? ShardSizeValue { get; set; } @@ -116,12 +110,6 @@ public MultiTermsAggregationDescriptor CollectMode(Elastic.Clients.El return Self; } - public MultiTermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum number of documents in a bucket for it to be returned. /// @@ -131,12 +119,6 @@ public MultiTermsAggregationDescriptor MinDocCount(long? minDocCount) return Self; } - public MultiTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
///
@@ -230,24 +212,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CollectModeValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); @@ -322,9 +292,7 @@ public MultiTermsAggregationDescriptor() : base() } private Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? CollectModeValue { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } - private string? NameValue { get; set; } private ICollection>? OrderValue { get; set; } private long? ShardMinDocCountValue { get; set; } private int? ShardSizeValue { get; set; } @@ -344,12 +312,6 @@ public MultiTermsAggregationDescriptor CollectMode(Elastic.Clients.Elasticsearch return Self; } - public MultiTermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The minimum number of documents in a bucket for it to be returned. /// @@ -359,12 +321,6 @@ public MultiTermsAggregationDescriptor MinDocCount(long? minDocCount) return Self; } - public MultiTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
///
@@ -458,24 +414,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, CollectModeValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); writer.WriteNumberValue(MinDocCountValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregation.g.cs index 9d32465bf04..c97b51e2570 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NestedAggregation.g.cs @@ -29,11 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Aggregations; public sealed partial class NestedAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// The path to the field of type `nested`. /// @@ -51,22 +46,8 @@ public NestedAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } - public NestedAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public NestedAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The path to the field of type `nested`. /// @@ -97,18 +78,6 @@ public NestedAggregationDescriptor Path(Expression? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } - public NestedAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public NestedAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The path to the field of type `nested`. /// @@ -173,18 +128,6 @@ public NestedAggregationDescriptor Path(Expression [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The specific method to apply. /// [JsonInclude, JsonPropertyName("method")] public Elastic.Clients.Elasticsearch.Aggregations.NormalizeMethod? Method { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(NormalizeAggregation normalizeAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.Normalize(normalizeAggregation); } @@ -71,9 +67,7 @@ public NormalizeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.NormalizeMethod? MethodValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -102,12 +96,6 @@ public NormalizeAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Ag return Self; } - public NormalizeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The specific method to apply. /// @@ -117,12 +105,6 @@ public NormalizeAggregationDescriptor Method(Elastic.Clients.Elasticsearch.Aggre return Self; } - public NormalizeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -144,24 +126,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MethodValue is not null) { writer.WritePropertyName("method"); JsonSerializer.Serialize(writer, MethodValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregation.g.cs index 5bec359e7a0..17ec89288c3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ParentAggregation.g.cs @@ -29,11 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Aggregations; public sealed partial class ParentAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// The child type that should be selected. /// @@ -51,22 +46,8 @@ public ParentAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private string? TypeValue { get; set; } - public ParentAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ParentAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The child type that should be selected. /// @@ -79,18 +60,6 @@ public ParentAggregationDescriptor Type(string? type) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (!string.IsNullOrEmpty(TypeValue)) { writer.WritePropertyName("type"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs index 538d1762054..446d66badd0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class PercentilesBucketAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The list of percentiles to calculate. @@ -71,8 +67,6 @@ public PercentilesBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private ICollection? PercentsValue { get; set; } /// @@ -102,18 +96,6 @@ public PercentilesBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elastics return Self; } - public PercentilesBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public PercentilesBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The list of percentiles to calculate. /// @@ -144,18 +126,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentsValue is not null) { writer.WritePropertyName("percents"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs index 1c5541c9c31..f3c496079aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs @@ -36,16 +36,12 @@ public sealed partial class RangeAggregation public Elastic.Clients.Elasticsearch.Field? Field { get; set; } [JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
[JsonInclude, JsonPropertyName("missing")] public int? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// An array of ranges used to bucket documents. @@ -68,9 +64,7 @@ public RangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MissingValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -110,12 +104,6 @@ public RangeAggregationDescriptor Format(string? format) return Self; } - public RangeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -125,12 +113,6 @@ public RangeAggregationDescriptor Missing(int? missing) return Self; } - public RangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// An array of ranges used to bucket documents. /// @@ -191,24 +173,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue.HasValue) { writer.WritePropertyName("missing"); writer.WriteNumberValue(MissingValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); @@ -260,9 +230,7 @@ public RangeAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MissingValue { get; set; } - private string? NameValue { get; set; } private ICollection? RangesValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.AggregationRangeDescriptor RangesDescriptor { get; set; } private Action RangesDescriptorAction { get; set; } @@ -302,12 +270,6 @@ public RangeAggregationDescriptor Format(string? format) return Self; } - public RangeAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -317,12 +279,6 @@ public RangeAggregationDescriptor Missing(int? missing) return Self; } - public RangeAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// An array of ranges used to bucket documents. /// @@ -383,24 +339,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue.HasValue) { writer.WritePropertyName("missing"); writer.WriteNumberValue(MissingValue.Value); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (RangesDescriptor is not null) { writer.WritePropertyName("ranges"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs index a45580dbe10..6a3439317a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs @@ -52,16 +52,12 @@ public sealed partial class RareTermsAggregation ///
[JsonInclude, JsonPropertyName("max_doc_count")] public long? MaxDocCount { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
[JsonInclude, JsonPropertyName("missing")] public Elastic.Clients.Elasticsearch.FieldValue? Missing { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The precision of the internal CuckooFilters.
Smaller precision leads to better approximation, but higher memory usage.
@@ -86,9 +82,7 @@ public RareTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? IncludeValue { get; set; } private long? MaxDocCountValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } private double? PrecisionValue { get; set; } private string? ValueTypeValue { get; set; } @@ -146,12 +140,6 @@ public RareTermsAggregationDescriptor MaxDocCount(long? maxDocCount) return Self; } - public RareTermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -161,12 +149,6 @@ public RareTermsAggregationDescriptor Missing(Elastic.Clients.Elastic return Self; } - public RareTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The precision of the internal CuckooFilters.
Smaller precision leads to better approximation, but higher memory usage.
///
@@ -209,24 +191,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDocCountValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); @@ -255,9 +225,7 @@ public RareTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? IncludeValue { get; set; } private long? MaxDocCountValue { get; set; } - private IDictionary? MetaValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue? MissingValue { get; set; } - private string? NameValue { get; set; } private double? PrecisionValue { get; set; } private string? ValueTypeValue { get; set; } @@ -315,12 +283,6 @@ public RareTermsAggregationDescriptor MaxDocCount(long? maxDocCount) return Self; } - public RareTermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// The value to apply to documents that do not have a value.
By default, documents without a value are ignored.
///
@@ -330,12 +292,6 @@ public RareTermsAggregationDescriptor Missing(Elastic.Clients.Elasticsearch.Fiel return Self; } - public RareTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The precision of the internal CuckooFilters.
Smaller precision leads to better approximation, but higher memory usage.
///
@@ -378,24 +334,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MaxDocCountValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MissingValue is not null) { writer.WritePropertyName("missing"); JsonSerializer.Serialize(writer, MissingValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PrecisionValue.HasValue) { writer.WritePropertyName("precision"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs index ec998a092cd..0f94a910916 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ReverseNestedAggregation.g.cs @@ -29,11 +29,6 @@ namespace Elastic.Clients.Elasticsearch.Aggregations; public sealed partial class ReverseNestedAggregation { - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// Defines the nested object field that should be joined back to.
The default is empty, which means that it joins back to the root/main document level.
///
@@ -51,22 +46,8 @@ public ReverseNestedAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } - public ReverseNestedAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ReverseNestedAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Defines the nested object field that should be joined back to.
The default is empty, which means that it joins back to the root/main document level.
///
@@ -97,18 +78,6 @@ public ReverseNestedAggregationDescriptor Path(Expression? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Field? PathValue { get; set; } - public ReverseNestedAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public ReverseNestedAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Defines the nested object field that should be joined back to.
The default is empty, which means that it joins back to the root/main document level.
///
@@ -173,18 +128,6 @@ public ReverseNestedAggregationDescriptor Path(Expression? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } - /// /// Limits how many top-scoring documents are collected in the sample processed on each shard. /// @@ -51,22 +46,8 @@ public SamplerAggregationDescriptor() : base() { } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private int? ShardSizeValue { get; set; } - public SamplerAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SamplerAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Limits how many top-scoring documents are collected in the sample processed on each shard. /// @@ -79,18 +60,6 @@ public SamplerAggregationDescriptor ShardSize(int? shardSize) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ShardSizeValue.HasValue) { writer.WritePropertyName("shard_size"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs index 39ba9c3a5a2..b0f35b6ab92 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs @@ -52,10 +52,6 @@ public sealed partial class SerialDifferencingAggregation ///
[JsonInclude, JsonPropertyName("lag")] public int? Lag { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(SerialDifferencingAggregation serialDifferencingAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.SerialDiff(serialDifferencingAggregation); } @@ -72,8 +68,6 @@ public SerialDifferencingAggregationDescriptor() : base() private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } private int? LagValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -111,18 +105,6 @@ public SerialDifferencingAggregationDescriptor Lag(int? lag) return Self; } - public SerialDifferencingAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SerialDifferencingAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -150,18 +132,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(LagValue.Value); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs index 5ee3a458e8d..cace1814f7e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs @@ -76,8 +76,6 @@ public sealed partial class SignificantTermsAggregation /// [JsonInclude, JsonPropertyName("jlh")] public Elastic.Clients.Elasticsearch.EmptyObject? Jlh { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only return terms that are found in more than `min_doc_count` hits. @@ -90,8 +88,6 @@ public sealed partial class SignificantTermsAggregation /// [JsonInclude, JsonPropertyName("mutual_information")] public Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristic? MutualInformation { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. @@ -150,12 +146,10 @@ public SignificantTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.EmptyObject? JlhValue { get; set; } private Elastic.Clients.Elasticsearch.EmptyObjectDescriptor JlhDescriptor { get; set; } private Action JlhDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } private Action MutualInformationDescriptorAction { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } private Action PercentageDescriptorAction { get; set; } @@ -328,12 +322,6 @@ public SignificantTermsAggregationDescriptor Jlh(Action Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return terms that are found in more than `min_doc_count` hits. /// @@ -370,12 +358,6 @@ public SignificantTermsAggregationDescriptor MutualInformation(Action return Self; } - public SignificantTermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. /// @@ -548,12 +530,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, JlhValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -576,12 +552,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MutualInformationValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentageDescriptor is not null) { writer.WritePropertyName("percentage"); @@ -660,12 +630,10 @@ public SignificantTermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.EmptyObject? JlhValue { get; set; } private Elastic.Clients.Elasticsearch.EmptyObjectDescriptor JlhDescriptor { get; set; } private Action JlhDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } private Action MutualInformationDescriptorAction { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } private Action PercentageDescriptorAction { get; set; } @@ -838,12 +806,6 @@ public SignificantTermsAggregationDescriptor Jlh(Action, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return terms that are found in more than `min_doc_count` hits. /// @@ -880,12 +842,6 @@ public SignificantTermsAggregationDescriptor MutualInformation(Action /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. /// @@ -1058,12 +1014,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, JlhValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -1086,12 +1036,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MutualInformationValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentageDescriptor is not null) { writer.WritePropertyName("percentage"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs index 4d6ad17d679..b86fdf06ac4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs @@ -82,8 +82,6 @@ public sealed partial class SignificantTextAggregation ///
[JsonInclude, JsonPropertyName("jlh")] public Elastic.Clients.Elasticsearch.EmptyObject? Jlh { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only return values that are found in more than `min_doc_count` hits. @@ -96,8 +94,6 @@ public sealed partial class SignificantTextAggregation /// [JsonInclude, JsonPropertyName("mutual_information")] public Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristic? MutualInformation { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. @@ -164,12 +160,10 @@ public SignificantTextAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.EmptyObject? JlhValue { get; set; } private Elastic.Clients.Elasticsearch.EmptyObjectDescriptor JlhDescriptor { get; set; } private Action JlhDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } private Action MutualInformationDescriptorAction { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } private Action PercentageDescriptorAction { get; set; } @@ -352,12 +346,6 @@ public SignificantTextAggregationDescriptor Jlh(Action Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return values that are found in more than `min_doc_count` hits. /// @@ -394,12 +382,6 @@ public SignificantTextAggregationDescriptor MutualInformation(Action< return Self; } - public SignificantTextAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. /// @@ -587,12 +569,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, JlhValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -615,12 +591,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MutualInformationValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentageDescriptor is not null) { writer.WritePropertyName("percentage"); @@ -706,12 +676,10 @@ public SignificantTextAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.EmptyObject? JlhValue { get; set; } private Elastic.Clients.Elasticsearch.EmptyObjectDescriptor JlhDescriptor { get; set; } private Action JlhDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } private long? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristic? MutualInformationValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristicDescriptor MutualInformationDescriptor { get; set; } private Action MutualInformationDescriptorAction { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.PercentageScoreHeuristic? PercentageValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.PercentageScoreHeuristicDescriptor PercentageDescriptor { get; set; } private Action PercentageDescriptorAction { get; set; } @@ -894,12 +862,6 @@ public SignificantTextAggregationDescriptor Jlh(Action, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return values that are found in more than `min_doc_count` hits. /// @@ -936,12 +898,6 @@ public SignificantTextAggregationDescriptor MutualInformation(Action /// A simple calculation of the number of documents in the foreground sample with a term divided by the number of documents in the background with the term. /// @@ -1129,12 +1085,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, JlhValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -1157,12 +1107,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MutualInformationValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (PercentageDescriptor is not null) { writer.WritePropertyName("percentage"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs index 2725082c9d2..9562ae23ea5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class StatsBucketAggregation ///
[JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(StatsBucketAggregation statsBucketAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.StatsBucket(statsBucketAggregation); } @@ -65,8 +61,6 @@ public StatsBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public StatsBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch. return Self; } - public StatsBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public StatsBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs index bb10b33eb66..ce715b4cc80 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs @@ -46,10 +46,6 @@ public sealed partial class SumBucketAggregation /// [JsonInclude, JsonPropertyName("gap_policy")] public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Aggregations.Aggregation(SumBucketAggregation sumBucketAggregation) => Elastic.Clients.Elasticsearch.Aggregations.Aggregation.SumBucket(sumBucketAggregation); } @@ -65,8 +61,6 @@ public SumBucketAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } /// /// Path to the buckets that contain one set of values to correlate. @@ -95,18 +89,6 @@ public SumBucketAggregationDescriptor GapPolicy(Elastic.Clients.Elasticsearch.Ag return Self; } - public SumBucketAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public SumBucketAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); @@ -128,18 +110,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, GapPolicyValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs index 89d5a438bc1..4e44151543f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs @@ -40,10 +40,6 @@ public sealed partial class TTestAggregation /// [JsonInclude, JsonPropertyName("b")] public Elastic.Clients.Elasticsearch.Aggregations.TestPopulation? b { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// The type of test. @@ -68,8 +64,6 @@ public TTestAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.TestPopulation? bValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TestPopulationDescriptor bDescriptor { get; set; } private Action> bDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TTestType? TypeValue { get; set; } /// @@ -126,18 +120,6 @@ public TTestAggregationDescriptor b(Action Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TTestAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The type of test. /// @@ -182,18 +164,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, bValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (TypeValue is not null) { writer.WritePropertyName("type"); @@ -218,8 +188,6 @@ public TTestAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Aggregations.TestPopulation? bValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TestPopulationDescriptor bDescriptor { get; set; } private Action bDescriptorAction { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TTestType? TypeValue { get; set; } /// @@ -276,18 +244,6 @@ public TTestAggregationDescriptor b(Action, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public TTestAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// The type of test. /// @@ -332,18 +288,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, bValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (TypeValue is not null) { writer.WritePropertyName("type"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs index 18d819e1f95..03ea9fb5af9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs @@ -60,8 +60,6 @@ public sealed partial class TermsAggregation /// [JsonInclude, JsonPropertyName("include")] public Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? Include { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } /// /// Only return values that are found in more than `min_doc_count` hits. @@ -78,8 +76,6 @@ public sealed partial class TermsAggregation public bool? MissingBucket { get; set; } [JsonInclude, JsonPropertyName("missing_order")] public Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? MissingOrder { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
@@ -132,12 +128,10 @@ public TermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? IncludeValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue? MissingValue { get; set; } private bool? MissingBucketValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private string? NameValue { get; set; } private ICollection>? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } @@ -214,12 +208,6 @@ public TermsAggregationDescriptor Include(Elastic.Clients.Elasticsear return Self; } - public TermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return values that are found in more than `min_doc_count` hits. /// @@ -250,12 +238,6 @@ public TermsAggregationDescriptor MissingOrder(Elastic.Clients.Elasti return Self; } - public TermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
///
@@ -346,12 +328,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -376,12 +352,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingOrderValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); @@ -436,12 +406,10 @@ public TermsAggregationDescriptor() : base() private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? IncludeValue { get; set; } - private IDictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } private Elastic.Clients.Elasticsearch.FieldValue? MissingValue { get; set; } private bool? MissingBucketValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? MissingOrderValue { get; set; } - private string? NameValue { get; set; } private ICollection>? OrderValue { get; set; } private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } @@ -518,12 +486,6 @@ public TermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Aggregat return Self; } - public TermsAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - /// /// Only return values that are found in more than `min_doc_count` hits. /// @@ -554,12 +516,6 @@ public TermsAggregationDescriptor MissingOrder(Elastic.Clients.Elasticsearch.Agg return Self; } - public TermsAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Specifies the sort order of the buckets.
Defaults to sorting by descending document count.
///
@@ -650,12 +606,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, IncludeValue, options); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -680,12 +630,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MissingOrderValue, options); } - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (OrderValue is not null) { writer.WritePropertyName("order"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs index 3c8d2a0966a..77442756579 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs @@ -46,6 +46,8 @@ public sealed partial class VariableWidthHistogramAggregation ///
[JsonInclude, JsonPropertyName("initial_buffer")] public int? InitialBuffer { get; set; } + [JsonInclude, JsonPropertyName("script")] + public Elastic.Clients.Elasticsearch.Script? Script { get; set; } /// /// The number of buckets that the coordinating node will request from each shard.
Defaults to `buckets * 50`.
@@ -67,6 +69,7 @@ public VariableWidthHistogramAggregationDescriptor() : base() private int? BucketsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private int? InitialBufferValue { get; set; } + private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } /// @@ -114,6 +117,12 @@ public VariableWidthHistogramAggregationDescriptor InitialBuffer(int? return Self; } + public VariableWidthHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) + { + ScriptValue = script; + return Self; + } + /// /// The number of buckets that the coordinating node will request from each shard.
Defaults to `buckets * 50`.
///
@@ -144,6 +153,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(InitialBufferValue.Value); } + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + if (ShardSizeValue.HasValue) { writer.WritePropertyName("shard_size"); @@ -165,6 +180,7 @@ public VariableWidthHistogramAggregationDescriptor() : base() private int? BucketsValue { get; set; } private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; } private int? InitialBufferValue { get; set; } + private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; } private int? ShardSizeValue { get; set; } /// @@ -212,6 +228,12 @@ public VariableWidthHistogramAggregationDescriptor InitialBuffer(int? initialBuf return Self; } + public VariableWidthHistogramAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script) + { + ScriptValue = script; + return Self; + } + /// /// The number of buckets that the coordinating node will request from each shard.
Defaults to `buckets * 50`.
///
@@ -242,6 +264,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(InitialBufferValue.Value); } + if (ScriptValue is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, ScriptValue, options); + } + if (ShardSizeValue.HasValue) { writer.WritePropertyName("shard_size"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs index 67402f22f89..2ca7d53ff28 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs @@ -34,10 +34,6 @@ public sealed partial class WeightedAverageAggregation ///
[JsonInclude, JsonPropertyName("format")] public string? Format { get; set; } - [JsonInclude, JsonPropertyName("meta")] - public IDictionary? Meta { get; set; } - [JsonInclude, JsonPropertyName("name")] - public string? Name { get; set; } /// /// Configuration for the field that provides the values. @@ -65,8 +61,6 @@ public WeightedAverageAggregationDescriptor() : base() } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValue? ValueValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValueDescriptor ValueDescriptor { get; set; } private Action> ValueDescriptorAction { get; set; } @@ -84,18 +78,6 @@ public WeightedAverageAggregationDescriptor Format(string? format) return Self; } - public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WeightedAverageAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Configuration for the field that provides the values. /// @@ -165,18 +147,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ValueDescriptor is not null) { writer.WritePropertyName("value"); @@ -228,8 +198,6 @@ public WeightedAverageAggregationDescriptor() : base() } private string? FormatValue { get; set; } - private IDictionary? MetaValue { get; set; } - private string? NameValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValue? ValueValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValueDescriptor ValueDescriptor { get; set; } private Action ValueDescriptorAction { get; set; } @@ -247,18 +215,6 @@ public WeightedAverageAggregationDescriptor Format(string? format) return Self; } - public WeightedAverageAggregationDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - public WeightedAverageAggregationDescriptor Name(string? name) - { - NameValue = name; - return Self; - } - /// /// Configuration for the field that provides the values. /// @@ -328,18 +284,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (MetaValue is not null) - { - writer.WritePropertyName("meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (!string.IsNullOrEmpty(NameValue)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(NameValue); - } - if (ValueDescriptor is not null) { writer.WritePropertyName("value"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs index db8de620f02..2b8bafd5a23 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HtmlStripCharFilter.g.cs @@ -29,6 +29,9 @@ namespace Elastic.Clients.Elasticsearch.Analysis; public sealed partial class HtmlStripCharFilter : ICharFilter { + [JsonInclude, JsonPropertyName("escaped_tags")] + public ICollection? EscapedTags { get; set; } + [JsonInclude, JsonPropertyName("type")] public string Type => "html_strip"; @@ -44,8 +47,15 @@ public HtmlStripCharFilterDescriptor() : base() { } + private ICollection? EscapedTagsValue { get; set; } private string? VersionValue { get; set; } + public HtmlStripCharFilterDescriptor EscapedTags(ICollection? escapedTags) + { + EscapedTagsValue = escapedTags; + return Self; + } + public HtmlStripCharFilterDescriptor Version(string? version) { VersionValue = version; @@ -55,6 +65,12 @@ public HtmlStripCharFilterDescriptor Version(string? version) protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); + if (EscapedTagsValue is not null) + { + writer.WritePropertyName("escaped_tags"); + JsonSerializer.Serialize(writer, EscapedTagsValue, options); + } + writer.WritePropertyName("type"); writer.WriteStringValue("html_strip"); if (!string.IsNullOrEmpty(VersionValue)) @@ -68,6 +84,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o HtmlStripCharFilter IBuildableDescriptor.Build() => new() { + EscapedTags = EscapedTagsValue, Version = VersionValue }; } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs index 3e875ef59b4..551835d00fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs @@ -39,6 +39,8 @@ public sealed partial class SynonymGraphTokenFilter : ITokenFilter public ICollection? Synonyms { get; set; } [JsonInclude, JsonPropertyName("synonyms_path")] public string? SynonymsPath { get; set; } + [JsonInclude, JsonPropertyName("synonyms_set")] + public string? SynonymsSet { get; set; } [JsonInclude, JsonPropertyName("tokenizer")] public string? Tokenizer { get; set; } @@ -64,6 +66,7 @@ public SynonymGraphTokenFilterDescriptor() : base() private bool? LenientValue { get; set; } private ICollection? SynonymsValue { get; set; } private string? SynonymsPathValue { get; set; } + private string? SynonymsSetValue { get; set; } private string? TokenizerValue { get; set; } private bool? UpdateableValue { get; set; } private string? VersionValue { get; set; } @@ -98,6 +101,12 @@ public SynonymGraphTokenFilterDescriptor SynonymsPath(string? synonymsPath) return Self; } + public SynonymGraphTokenFilterDescriptor SynonymsSet(string? synonymsSet) + { + SynonymsSetValue = synonymsSet; + return Self; + } + public SynonymGraphTokenFilterDescriptor Tokenizer(string? tokenizer) { TokenizerValue = tokenizer; @@ -149,6 +158,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SynonymsPathValue); } + if (!string.IsNullOrEmpty(SynonymsSetValue)) + { + writer.WritePropertyName("synonyms_set"); + writer.WriteStringValue(SynonymsSetValue); + } + if (!string.IsNullOrEmpty(TokenizerValue)) { writer.WritePropertyName("tokenizer"); @@ -179,6 +194,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Lenient = LenientValue, Synonyms = SynonymsValue, SynonymsPath = SynonymsPathValue, + SynonymsSet = SynonymsSetValue, Tokenizer = TokenizerValue, Updateable = UpdateableValue, Version = VersionValue diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs index 2dac054af31..daf926adadd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs @@ -39,6 +39,8 @@ public sealed partial class SynonymTokenFilter : ITokenFilter public ICollection? Synonyms { get; set; } [JsonInclude, JsonPropertyName("synonyms_path")] public string? SynonymsPath { get; set; } + [JsonInclude, JsonPropertyName("synonyms_set")] + public string? SynonymsSet { get; set; } [JsonInclude, JsonPropertyName("tokenizer")] public string? Tokenizer { get; set; } @@ -64,6 +66,7 @@ public SynonymTokenFilterDescriptor() : base() private bool? LenientValue { get; set; } private ICollection? SynonymsValue { get; set; } private string? SynonymsPathValue { get; set; } + private string? SynonymsSetValue { get; set; } private string? TokenizerValue { get; set; } private bool? UpdateableValue { get; set; } private string? VersionValue { get; set; } @@ -98,6 +101,12 @@ public SynonymTokenFilterDescriptor SynonymsPath(string? synonymsPath) return Self; } + public SynonymTokenFilterDescriptor SynonymsSet(string? synonymsSet) + { + SynonymsSetValue = synonymsSet; + return Self; + } + public SynonymTokenFilterDescriptor Tokenizer(string? tokenizer) { TokenizerValue = tokenizer; @@ -149,6 +158,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(SynonymsPathValue); } + if (!string.IsNullOrEmpty(SynonymsSetValue)) + { + writer.WritePropertyName("synonyms_set"); + writer.WriteStringValue(SynonymsSetValue); + } + if (!string.IsNullOrEmpty(TokenizerValue)) { writer.WritePropertyName("tokenizer"); @@ -179,6 +194,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o Lenient = LenientValue, Synonyms = SynonymsValue, SynonymsPath = SynonymsPathValue, + SynonymsSet = SynonymsSetValue, Tokenizer = TokenizerValue, Updateable = UpdateableValue, Version = VersionValue diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs index 8a04472629b..6af770f0a3d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs @@ -95,7 +95,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "knn") { - variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); + variant.Knn = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -463,7 +463,7 @@ public sealed partial class MultisearchBody /// /// Defines the approximate kNN search to run. /// - public ICollection? Knn { get; set; } + public ICollection? Knn { get; set; } /// /// Minimum _score for matching documents. Documents with a lower _score are
not included in the search results.
@@ -574,10 +574,10 @@ public MultisearchBodyDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action> KnnDescriptorAction { get; set; } - private Action>[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action> KnnDescriptorAction { get; set; } + private Action>[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -785,7 +785,7 @@ public MultisearchBodyDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public MultisearchBodyDescriptor Knn(ICollection? knn) + public MultisearchBodyDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -794,7 +794,7 @@ public MultisearchBodyDescriptor Knn(ICollection Knn(Elastic.Clients.Elasticsearch.KnnQueryDescriptor descriptor) + public MultisearchBodyDescriptor Knn(Elastic.Clients.Elasticsearch.KnnSearchDescriptor descriptor) { KnnValue = null; KnnDescriptorAction = null; @@ -803,7 +803,7 @@ public MultisearchBodyDescriptor Knn(Elastic.Clients.Elasticsearch.Kn return Self; } - public MultisearchBodyDescriptor Knn(Action> configure) + public MultisearchBodyDescriptor Knn(Action> configure) { KnnValue = null; KnnDescriptor = null; @@ -812,7 +812,7 @@ public MultisearchBodyDescriptor Knn(Action Knn(params Action>[] configure) + public MultisearchBodyDescriptor Knn(params Action>[] configure) { KnnValue = null; KnnDescriptor = null; @@ -1259,7 +1259,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -1268,7 +1268,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -1277,7 +1277,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) @@ -1523,10 +1523,10 @@ public MultisearchBodyDescriptor() : base() private Elastic.Clients.Elasticsearch.Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } private ICollection>? IndicesBoostValue { get; set; } - private ICollection? KnnValue { get; set; } - private Elastic.Clients.Elasticsearch.KnnQueryDescriptor KnnDescriptor { get; set; } - private Action KnnDescriptorAction { get; set; } - private Action[] KnnDescriptorActions { get; set; } + private ICollection? KnnValue { get; set; } + private Elastic.Clients.Elasticsearch.KnnSearchDescriptor KnnDescriptor { get; set; } + private Action KnnDescriptorAction { get; set; } + private Action[] KnnDescriptorActions { get; set; } private double? MinScoreValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } @@ -1734,7 +1734,7 @@ public MultisearchBodyDescriptor IndicesBoost(ICollection /// Defines the approximate kNN search to run. ///
- public MultisearchBodyDescriptor Knn(ICollection? knn) + public MultisearchBodyDescriptor Knn(ICollection? knn) { KnnDescriptor = null; KnnDescriptorAction = null; @@ -1743,7 +1743,7 @@ public MultisearchBodyDescriptor Knn(ICollection configure) + public MultisearchBodyDescriptor Knn(Action configure) { KnnValue = null; KnnDescriptor = null; @@ -1761,7 +1761,7 @@ public MultisearchBodyDescriptor Knn(Action[] configure) + public MultisearchBodyDescriptor Knn(params Action[] configure) { KnnValue = null; KnnDescriptor = null; @@ -2208,7 +2208,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnDescriptorAction is not null) { writer.WritePropertyName("knn"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(KnnDescriptorAction), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(KnnDescriptorAction), options); } else if (KnnDescriptorActions is not null) { @@ -2217,7 +2217,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in KnnDescriptorActions) { - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnQueryDescriptor(action), options); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.KnnSearchDescriptor(action), options); } if (KnnDescriptorActions.Length != 1) @@ -2226,7 +2226,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (KnnValue is not null) { writer.WritePropertyName("knn"); - SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); + SingleOrManySerializationHelper.Serialize(KnnValue, writer, options); } if (MinScoreValue.HasValue) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/LearningToRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/LearningToRank.g.cs new file mode 100644 index 00000000000..49d52298813 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/LearningToRank.g.cs @@ -0,0 +1,89 @@ +// 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.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search; + +public sealed partial class LearningToRank +{ + /// + /// The unique identifier of the trained model uploaded to Elasticsearch + /// + [JsonInclude, JsonPropertyName("model_id")] + public string ModelId { get; set; } + + /// + /// Named parameters to be passed to the query templates used for feature + /// + [JsonInclude, JsonPropertyName("params")] + public IDictionary? Params { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Core.Search.Rescore(LearningToRank learningToRank) => Elastic.Clients.Elasticsearch.Core.Search.Rescore.LearningToRank(learningToRank); +} + +public sealed partial class LearningToRankDescriptor : SerializableDescriptor +{ + internal LearningToRankDescriptor(Action configure) => configure.Invoke(this); + + public LearningToRankDescriptor() : base() + { + } + + private string ModelIdValue { get; set; } + private IDictionary? ParamsValue { get; set; } + + /// + /// The unique identifier of the trained model uploaded to Elasticsearch + /// + public LearningToRankDescriptor ModelId(string modelId) + { + ModelIdValue = modelId; + return Self; + } + + /// + /// Named parameters to be passed to the query templates used for feature + /// + public LearningToRankDescriptor Params(Func, FluentDictionary> selector) + { + ParamsValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("model_id"); + writer.WriteStringValue(ModelIdValue); + if (ParamsValue is not null) + { + writer.WritePropertyName("params"); + JsonSerializer.Serialize(writer, ParamsValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs index f398005c17b..4690dd4d38a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs @@ -21,18 +21,129 @@ using Elastic.Clients.Elasticsearch.Serialization; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; using System.Text.Json; using System.Text.Json.Serialization; namespace Elastic.Clients.Elasticsearch.Core.Search; +[JsonConverter(typeof(RescoreConverter))] public sealed partial class Rescore { - [JsonInclude, JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery Query { get; set; } + internal Rescore(string variantName, object variant) + { + if (variantName is null) + throw new ArgumentNullException(nameof(variantName)); + if (variant is null) + throw new ArgumentNullException(nameof(variant)); + if (string.IsNullOrWhiteSpace(variantName)) + throw new ArgumentException("Variant name must not be empty or whitespace."); + VariantName = variantName; + Variant = variant; + } + + internal object Variant { get; } + internal string VariantName { get; } + + public static Rescore LearningToRank(Elastic.Clients.Elasticsearch.Core.Search.LearningToRank learningToRank) => new Rescore("learning_to_rank", learningToRank); + public static Rescore Query(Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery rescoreQuery) => new Rescore("query", rescoreQuery); + [JsonInclude, JsonPropertyName("window_size")] public int? WindowSize { get; set; } + + public bool TryGet([NotNullWhen(true)] out T? result) where T : class + { + result = default; + if (Variant is T variant) + { + result = variant; + return true; + } + + return false; + } +} + +internal sealed partial class RescoreConverter : JsonConverter +{ + public override Rescore Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartObject) + { + throw new JsonException("Expected start token."); + } + + object? variantValue = default; + string? variantNameValue = default; + int? windowSizeValue = default; + while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) + { + if (reader.TokenType != JsonTokenType.PropertyName) + { + throw new JsonException("Expected a property name token."); + } + + if (reader.TokenType != JsonTokenType.PropertyName) + { + throw new JsonException("Expected a property name token representing the name of an Elasticsearch field."); + } + + var propertyName = reader.GetString(); + reader.Read(); + if (propertyName == "window_size") + { + windowSizeValue = JsonSerializer.Deserialize(ref reader, options); + continue; + } + + if (propertyName == "learning_to_rank") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + + if (propertyName == "query") + { + variantValue = JsonSerializer.Deserialize(ref reader, options); + variantNameValue = propertyName; + continue; + } + + throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'Rescore' from the response."); + } + + var result = new Rescore(variantNameValue, variantValue); + result.WindowSize = windowSizeValue; + return result; + } + + public override void Write(Utf8JsonWriter writer, Rescore value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + if (value.WindowSize.HasValue) + { + writer.WritePropertyName("window_size"); + writer.WriteNumberValue(value.WindowSize.Value); + } + + if (value.VariantName is not null && value.Variant is not null) + { + writer.WritePropertyName(value.VariantName); + switch (value.VariantName) + { + case "learning_to_rank": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Core.Search.LearningToRank)value.Variant, options); + break; + case "query": + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery)value.Variant, options); + break; + } + } + + writer.WriteEndObject(); + } } public sealed partial class RescoreDescriptor : SerializableDescriptor> @@ -43,34 +154,30 @@ public RescoreDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.RescoreQueryDescriptor QueryDescriptor { get; set; } - private Action> QueryDescriptorAction { get; set; } - private int? WindowSizeValue { get; set; } + private bool ContainsVariant { get; set; } + private string ContainedVariantName { get; set; } + private object Variant { get; set; } + private Descriptor Descriptor { get; set; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery query) + private RescoreDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; + ContainedVariantName = variantName; + ContainsVariant = true; + var descriptor = (T)Activator.CreateInstance(typeof(T), true); + descriptorAction?.Invoke(descriptor); + Descriptor = descriptor; return Self; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Core.Search.RescoreQueryDescriptor descriptor) + private RescoreDescriptor Set(object variant, string variantName) { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; + Variant = variant; + ContainedVariantName = variantName; + ContainsVariant = true; return Self; } - public RescoreDescriptor Query(Action> configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } + private int? WindowSizeValue { get; set; } public RescoreDescriptor WindowSize(int? windowSize) { @@ -78,31 +185,33 @@ public RescoreDescriptor WindowSize(int? windowSize) return Self; } + public RescoreDescriptor LearningToRank(Elastic.Clients.Elasticsearch.Core.Search.LearningToRank learningToRank) => Set(learningToRank, "learning_to_rank"); + public RescoreDescriptor LearningToRank(Action configure) => Set(configure, "learning_to_rank"); + public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery rescoreQuery) => Set(rescoreQuery, "query"); + public RescoreDescriptor Query(Action> configure) => Set(configure, "query"); + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Core.Search.RescoreQueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - if (WindowSizeValue.HasValue) { writer.WritePropertyName("window_size"); writer.WriteNumberValue(WindowSizeValue.Value); } + if (!string.IsNullOrEmpty(ContainedVariantName)) + { + writer.WritePropertyName(ContainedVariantName); + if (Variant is not null) + { + JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); + writer.WriteEndObject(); + return; + } + + JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); + } + writer.WriteEndObject(); } } @@ -115,34 +224,30 @@ public RescoreDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery QueryValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.RescoreQueryDescriptor QueryDescriptor { get; set; } - private Action QueryDescriptorAction { get; set; } - private int? WindowSizeValue { get; set; } + private bool ContainsVariant { get; set; } + private string ContainedVariantName { get; set; } + private object Variant { get; set; } + private Descriptor Descriptor { get; set; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery query) + private RescoreDescriptor Set(Action descriptorAction, string variantName) where T : Descriptor { - QueryDescriptor = null; - QueryDescriptorAction = null; - QueryValue = query; + ContainedVariantName = variantName; + ContainsVariant = true; + var descriptor = (T)Activator.CreateInstance(typeof(T), true); + descriptorAction?.Invoke(descriptor); + Descriptor = descriptor; return Self; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Core.Search.RescoreQueryDescriptor descriptor) + private RescoreDescriptor Set(object variant, string variantName) { - QueryValue = null; - QueryDescriptorAction = null; - QueryDescriptor = descriptor; + Variant = variant; + ContainedVariantName = variantName; + ContainsVariant = true; return Self; } - public RescoreDescriptor Query(Action configure) - { - QueryValue = null; - QueryDescriptor = null; - QueryDescriptorAction = configure; - return Self; - } + private int? WindowSizeValue { get; set; } public RescoreDescriptor WindowSize(int? windowSize) { @@ -150,31 +255,33 @@ public RescoreDescriptor WindowSize(int? windowSize) return Self; } + public RescoreDescriptor LearningToRank(Elastic.Clients.Elasticsearch.Core.Search.LearningToRank learningToRank) => Set(learningToRank, "learning_to_rank"); + public RescoreDescriptor LearningToRank(Action configure) => Set(configure, "learning_to_rank"); + public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery rescoreQuery) => Set(rescoreQuery, "query"); + public RescoreDescriptor Query(Action configure) => Set(configure, "query"); + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (QueryDescriptor is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryDescriptor, options); - } - else if (QueryDescriptorAction is not null) - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Core.Search.RescoreQueryDescriptor(QueryDescriptorAction), options); - } - else - { - writer.WritePropertyName("query"); - JsonSerializer.Serialize(writer, QueryValue, options); - } - if (WindowSizeValue.HasValue) { writer.WritePropertyName("window_size"); writer.WriteNumberValue(WindowSizeValue.Value); } + if (!string.IsNullOrEmpty(ContainedVariantName)) + { + writer.WritePropertyName(ContainedVariantName); + if (Variant is not null) + { + JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); + writer.WriteEndObject(); + return; + } + + JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); + } + writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs index 2923fd99d06..5ab3908627f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs @@ -52,6 +52,8 @@ public sealed partial class RescoreQuery ///
[JsonInclude, JsonPropertyName("score_mode")] public Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? ScoreMode { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Core.Search.Rescore(RescoreQuery rescoreQuery) => Elastic.Clients.Elasticsearch.Core.Search.Rescore.Query(rescoreQuery); } public sealed partial class RescoreQueryDescriptor : SerializableDescriptor> diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs index 3771a812b20..ab0a177455b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs @@ -34,7 +34,11 @@ public enum TaskType [EnumMember(Value = "text_embedding")] TextEmbedding, [EnumMember(Value = "sparse_embedding")] - SparseEmbedding + SparseEmbedding, + [EnumMember(Value = "rerank")] + Rerank, + [EnumMember(Value = "completion")] + Completion } internal sealed class TaskTypeConverter : JsonConverter @@ -48,6 +52,10 @@ public override TaskType Read(ref Utf8JsonReader reader, Type typeToConvert, Jso return TaskType.TextEmbedding; case "sparse_embedding": return TaskType.SparseEmbedding; + case "rerank": + return TaskType.Rerank; + case "completion": + return TaskType.Completion; } ThrowHelper.ThrowJsonException(); @@ -64,6 +72,12 @@ public override void Write(Utf8JsonWriter writer, TaskType value, JsonSerializer case TaskType.SparseEmbedding: writer.WriteStringValue("sparse_embedding"); return; + case TaskType.Rerank: + writer.WriteStringValue("rerank"); + return; + case TaskType.Completion: + writer.WriteStringValue("completion"); + return; } writer.WriteNullValue(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs index b194433ef83..e1aa232055d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Mapping.g.cs @@ -660,6 +660,8 @@ public enum RuntimeFieldType Double, [EnumMember(Value = "date")] Date, + [EnumMember(Value = "composite")] + Composite, [EnumMember(Value = "boolean")] Boolean } @@ -685,6 +687,8 @@ public override RuntimeFieldType Read(ref Utf8JsonReader reader, Type typeToConv return RuntimeFieldType.Double; case "date": return RuntimeFieldType.Date; + case "composite": + return RuntimeFieldType.Composite; case "boolean": return RuntimeFieldType.Boolean; } @@ -718,6 +722,9 @@ public override void Write(Utf8JsonWriter writer, RuntimeFieldType value, JsonSe case RuntimeFieldType.Date: writer.WriteStringValue("date"); return; + case RuntimeFieldType.Composite: + writer.WriteStringValue("composite"); + return; case RuntimeFieldType.Boolean: writer.WriteStringValue("boolean"); return; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs index 8b858e71b2a..41fef444c36 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs @@ -30,169 +30,23 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class DataStreamLifecycleRolloverConditions { [JsonInclude, JsonPropertyName("max_age")] - public string? MaxAge { get; set; } + public string? MaxAge { get; init; } [JsonInclude, JsonPropertyName("max_docs")] - public long? MaxDocs { get; set; } + public long? MaxDocs { get; init; } [JsonInclude, JsonPropertyName("max_primary_shard_docs")] - public long? MaxPrimaryShardDocs { get; set; } + public long? MaxPrimaryShardDocs { get; init; } [JsonInclude, JsonPropertyName("max_primary_shard_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MaxPrimaryShardSize { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? MaxPrimaryShardSize { get; init; } [JsonInclude, JsonPropertyName("max_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MaxSize { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? MaxSize { get; init; } [JsonInclude, JsonPropertyName("min_age")] - public Elastic.Clients.Elasticsearch.Duration? MinAge { get; set; } + public Elastic.Clients.Elasticsearch.Duration? MinAge { get; init; } [JsonInclude, JsonPropertyName("min_docs")] - public long? MinDocs { get; set; } + public long? MinDocs { get; init; } [JsonInclude, JsonPropertyName("min_primary_shard_docs")] - public long? MinPrimaryShardDocs { get; set; } + public long? MinPrimaryShardDocs { get; init; } [JsonInclude, JsonPropertyName("min_primary_shard_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MinPrimaryShardSize { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? MinPrimaryShardSize { get; init; } [JsonInclude, JsonPropertyName("min_size")] - public Elastic.Clients.Elasticsearch.ByteSize? MinSize { get; set; } -} - -public sealed partial class DataStreamLifecycleRolloverConditionsDescriptor : SerializableDescriptor -{ - internal DataStreamLifecycleRolloverConditionsDescriptor(Action configure) => configure.Invoke(this); - - public DataStreamLifecycleRolloverConditionsDescriptor() : base() - { - } - - private string? MaxAgeValue { get; set; } - private long? MaxDocsValue { get; set; } - private long? MaxPrimaryShardDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.ByteSize? MaxPrimaryShardSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.ByteSize? MaxSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.Duration? MinAgeValue { get; set; } - private long? MinDocsValue { get; set; } - private long? MinPrimaryShardDocsValue { get; set; } - private Elastic.Clients.Elasticsearch.ByteSize? MinPrimaryShardSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.ByteSize? MinSizeValue { get; set; } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxAge(string? maxAge) - { - MaxAgeValue = maxAge; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxDocs(long? maxDocs) - { - MaxDocsValue = maxDocs; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxPrimaryShardDocs(long? maxPrimaryShardDocs) - { - MaxPrimaryShardDocsValue = maxPrimaryShardDocs; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxPrimaryShardSize(Elastic.Clients.Elasticsearch.ByteSize? maxPrimaryShardSize) - { - MaxPrimaryShardSizeValue = maxPrimaryShardSize; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MaxSize(Elastic.Clients.Elasticsearch.ByteSize? maxSize) - { - MaxSizeValue = maxSize; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinAge(Elastic.Clients.Elasticsearch.Duration? minAge) - { - MinAgeValue = minAge; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinDocs(long? minDocs) - { - MinDocsValue = minDocs; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinPrimaryShardDocs(long? minPrimaryShardDocs) - { - MinPrimaryShardDocsValue = minPrimaryShardDocs; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinPrimaryShardSize(Elastic.Clients.Elasticsearch.ByteSize? minPrimaryShardSize) - { - MinPrimaryShardSizeValue = minPrimaryShardSize; - return Self; - } - - public DataStreamLifecycleRolloverConditionsDescriptor MinSize(Elastic.Clients.Elasticsearch.ByteSize? minSize) - { - MinSizeValue = minSize; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(MaxAgeValue)) - { - writer.WritePropertyName("max_age"); - writer.WriteStringValue(MaxAgeValue); - } - - if (MaxDocsValue.HasValue) - { - writer.WritePropertyName("max_docs"); - writer.WriteNumberValue(MaxDocsValue.Value); - } - - if (MaxPrimaryShardDocsValue.HasValue) - { - writer.WritePropertyName("max_primary_shard_docs"); - writer.WriteNumberValue(MaxPrimaryShardDocsValue.Value); - } - - if (MaxPrimaryShardSizeValue is not null) - { - writer.WritePropertyName("max_primary_shard_size"); - JsonSerializer.Serialize(writer, MaxPrimaryShardSizeValue, options); - } - - if (MaxSizeValue is not null) - { - writer.WritePropertyName("max_size"); - JsonSerializer.Serialize(writer, MaxSizeValue, options); - } - - if (MinAgeValue is not null) - { - writer.WritePropertyName("min_age"); - JsonSerializer.Serialize(writer, MinAgeValue, options); - } - - if (MinDocsValue.HasValue) - { - writer.WritePropertyName("min_docs"); - writer.WriteNumberValue(MinDocsValue.Value); - } - - if (MinPrimaryShardDocsValue.HasValue) - { - writer.WritePropertyName("min_primary_shard_docs"); - writer.WriteNumberValue(MinPrimaryShardDocsValue.Value); - } - - if (MinPrimaryShardSizeValue is not null) - { - writer.WritePropertyName("min_primary_shard_size"); - JsonSerializer.Serialize(writer, MinPrimaryShardSizeValue, options); - } - - if (MinSizeValue is not null) - { - writer.WritePropertyName("min_size"); - JsonSerializer.Serialize(writer, MinSizeValue, options); - } - - writer.WriteEndObject(); - } + public Elastic.Clients.Elasticsearch.ByteSize? MinSize { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs index 6abf40f7723..c1ad26bb94e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs @@ -36,144 +36,17 @@ public sealed partial class DataStreamLifecycleWithRollover /// If defined, every document added to this data stream will be stored at least for this time frame.
Any time after this duration the document could be deleted.
When empty, every document in this data stream will be stored indefinitely.
///
[JsonInclude, JsonPropertyName("data_retention")] - public Elastic.Clients.Elasticsearch.Duration? DataRetention { get; set; } + public Elastic.Clients.Elasticsearch.Duration? DataRetention { get; init; } /// /// The downsampling configuration to execute for the managed backing index after rollover. /// [JsonInclude, JsonPropertyName("downsampling")] - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; set; } + public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? Downsampling { get; init; } /// /// The conditions which will trigger the rollover of a backing index as configured by the cluster setting `cluster.lifecycle.default.rollover`.
This property is an implementation detail and it will only be retrieved when the query param `include_defaults` is set to true.
The contents of this field are subject to change.
///
[JsonInclude, JsonPropertyName("rollover")] - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditions? Rollover { get; set; } -} - -/// -/// Data lifecycle with rollover can be used to display the configuration including the default rollover conditions,
if asked.
-///
-public sealed partial class DataStreamLifecycleWithRolloverDescriptor : SerializableDescriptor -{ - internal DataStreamLifecycleWithRolloverDescriptor(Action configure) => configure.Invoke(this); - - public DataStreamLifecycleWithRolloverDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Duration? DataRetentionValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? DownsamplingValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor DownsamplingDescriptor { get; set; } - private Action DownsamplingDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditions? RolloverValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditionsDescriptor RolloverDescriptor { get; set; } - private Action RolloverDescriptorAction { get; set; } - - /// - /// If defined, every document added to this data stream will be stored at least for this time frame.
Any time after this duration the document could be deleted.
When empty, every document in this data stream will be stored indefinitely.
- ///
- public DataStreamLifecycleWithRolloverDescriptor DataRetention(Elastic.Clients.Elasticsearch.Duration? dataRetention) - { - DataRetentionValue = dataRetention; - return Self; - } - - /// - /// The downsampling configuration to execute for the managed backing index after rollover. - /// - public DataStreamLifecycleWithRolloverDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsampling? downsampling) - { - DownsamplingDescriptor = null; - DownsamplingDescriptorAction = null; - DownsamplingValue = downsampling; - return Self; - } - - public DataStreamLifecycleWithRolloverDescriptor Downsampling(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor descriptor) - { - DownsamplingValue = null; - DownsamplingDescriptorAction = null; - DownsamplingDescriptor = descriptor; - return Self; - } - - public DataStreamLifecycleWithRolloverDescriptor Downsampling(Action configure) - { - DownsamplingValue = null; - DownsamplingDescriptor = null; - DownsamplingDescriptorAction = configure; - return Self; - } - - /// - /// The conditions which will trigger the rollover of a backing index as configured by the cluster setting `cluster.lifecycle.default.rollover`.
This property is an implementation detail and it will only be retrieved when the query param `include_defaults` is set to true.
The contents of this field are subject to change.
- ///
- public DataStreamLifecycleWithRolloverDescriptor Rollover(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditions? rollover) - { - RolloverDescriptor = null; - RolloverDescriptorAction = null; - RolloverValue = rollover; - return Self; - } - - public DataStreamLifecycleWithRolloverDescriptor Rollover(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditionsDescriptor descriptor) - { - RolloverValue = null; - RolloverDescriptorAction = null; - RolloverDescriptor = descriptor; - return Self; - } - - public DataStreamLifecycleWithRolloverDescriptor Rollover(Action configure) - { - RolloverValue = null; - RolloverDescriptor = null; - RolloverDescriptorAction = configure; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (DataRetentionValue is not null) - { - writer.WritePropertyName("data_retention"); - JsonSerializer.Serialize(writer, DataRetentionValue, options); - } - - if (DownsamplingDescriptor is not null) - { - writer.WritePropertyName("downsampling"); - JsonSerializer.Serialize(writer, DownsamplingDescriptor, options); - } - else if (DownsamplingDescriptorAction is not null) - { - writer.WritePropertyName("downsampling"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleDownsamplingDescriptor(DownsamplingDescriptorAction), options); - } - else if (DownsamplingValue is not null) - { - writer.WritePropertyName("downsampling"); - JsonSerializer.Serialize(writer, DownsamplingValue, options); - } - - if (RolloverDescriptor is not null) - { - writer.WritePropertyName("rollover"); - JsonSerializer.Serialize(writer, RolloverDescriptor, options); - } - else if (RolloverDescriptorAction is not null) - { - writer.WritePropertyName("rollover"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditionsDescriptor(RolloverDescriptorAction), options); - } - else if (RolloverValue is not null) - { - writer.WritePropertyName("rollover"); - JsonSerializer.Serialize(writer, RolloverValue, options); - } - - writer.WriteEndObject(); - } + public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleRolloverConditions? Rollover { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs index 81ae8706d45..d2b7edca03d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs @@ -39,7 +39,7 @@ public sealed partial class IndexSettingsLifecycle /// The name of the policy to use to manage the index. For information about how Elasticsearch applies policy changes, see Policy updates. ///
[JsonInclude, JsonPropertyName("name")] - public Elastic.Clients.Elasticsearch.Name Name { get; set; } + public Elastic.Clients.Elasticsearch.Name? Name { get; set; } /// /// If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting
if you create a new index that contains old data and want to use the original creation date to calculate the index
age. Specified as a Unix epoch value in milliseconds.
@@ -71,7 +71,7 @@ public IndexSettingsLifecycleDescriptor() : base() } private bool? IndexingCompleteValue { get; set; } - private Elastic.Clients.Elasticsearch.Name NameValue { get; set; } + private Elastic.Clients.Elasticsearch.Name? NameValue { get; set; } private long? OriginationDateValue { get; set; } private bool? ParseOriginationDateValue { get; set; } private string? RolloverAliasValue { get; set; } @@ -91,7 +91,7 @@ public IndexSettingsLifecycleDescriptor IndexingComplete(bool? indexingComplete /// /// The name of the policy to use to manage the index. For information about how Elasticsearch applies policy changes, see Policy updates. /// - public IndexSettingsLifecycleDescriptor Name(Elastic.Clients.Elasticsearch.Name name) + public IndexSettingsLifecycleDescriptor Name(Elastic.Clients.Elasticsearch.Name? name) { NameValue = name; return Self; @@ -157,8 +157,12 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteBooleanValue(IndexingCompleteValue.Value); } - writer.WritePropertyName("name"); - JsonSerializer.Serialize(writer, NameValue, options); + if (NameValue is not null) + { + writer.WritePropertyName("name"); + JsonSerializer.Serialize(writer, NameValue, options); + } + if (OriginationDateValue.HasValue) { writer.WritePropertyName("origination_date"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs index 6e5ae02b7b3..773c53217ca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs @@ -30,433 +30,48 @@ namespace Elastic.Clients.Elasticsearch.IndexManagement; public sealed partial class IndexTemplate { [JsonInclude, JsonPropertyName("allow_auto_create")] - public bool? AllowAutoCreate { get; set; } + public bool? AllowAutoCreate { get; init; } /// /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
///
[JsonInclude, JsonPropertyName("composed_of")] - public ICollection ComposedOf { get; set; } + public IReadOnlyCollection ComposedOf { get; init; } /// /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
///
[JsonInclude, JsonPropertyName("data_stream")] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? DataStream { get; set; } + public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? DataStream { get; init; } /// /// Name of the index template. /// [JsonInclude, JsonPropertyName("index_patterns")] - public Elastic.Clients.Elasticsearch.Names IndexPatterns { get; set; } + [SingleOrManyCollectionConverter(typeof(string))] + public IReadOnlyCollection IndexPatterns { get; init; } /// /// Optional user metadata about the index template. May have any contents.
This map is not automatically generated by Elasticsearch.
///
[JsonInclude, JsonPropertyName("_meta")] - public IDictionary? Meta { get; set; } + public IReadOnlyDictionary? Meta { get; init; } /// /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
///
[JsonInclude, JsonPropertyName("priority")] - public long? Priority { get; set; } + public long? Priority { get; init; } /// /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
///
[JsonInclude, JsonPropertyName("template")] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? Template { get; set; } + public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? Template { get; init; } /// /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
///
[JsonInclude, JsonPropertyName("version")] - public long? Version { get; set; } -} - -public sealed partial class IndexTemplateDescriptor : SerializableDescriptor> -{ - internal IndexTemplateDescriptor(Action> configure) => configure.Invoke(this); - - public IndexTemplateDescriptor() : base() - { - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Names IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor TemplateDescriptor { get; set; } - private Action> TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - public IndexTemplateDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- public IndexTemplateDescriptor ComposedOf(ICollection composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public IndexTemplateDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// Name of the index template. - /// - public IndexTemplateDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Names indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// Optional user metadata about the index template. May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Priority(long? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public IndexTemplateDescriptor Template(Action> configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexTemplateDescriptor : SerializableDescriptor -{ - internal IndexTemplateDescriptor(Action configure) => configure.Invoke(this); - - public IndexTemplateDescriptor() : base() - { - } - - private bool? AllowAutoCreateValue { get; set; } - private ICollection ComposedOfValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? DataStreamValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor DataStreamDescriptor { get; set; } - private Action DataStreamDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Names IndexPatternsValue { get; set; } - private IDictionary? MetaValue { get; set; } - private long? PriorityValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? TemplateValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor TemplateDescriptor { get; set; } - private Action TemplateDescriptorAction { get; set; } - private long? VersionValue { get; set; } - - public IndexTemplateDescriptor AllowAutoCreate(bool? allowAutoCreate = true) - { - AllowAutoCreateValue = allowAutoCreate; - return Self; - } - - /// - /// An ordered list of component template names.
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
- ///
- public IndexTemplateDescriptor ComposedOf(ICollection composedOf) - { - ComposedOfValue = composedOf; - return Self; - } - - /// - /// If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
- ///
- public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration? dataStream) - { - DataStreamDescriptor = null; - DataStreamDescriptorAction = null; - DataStreamValue = dataStream; - return Self; - } - - public IndexTemplateDescriptor DataStream(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor descriptor) - { - DataStreamValue = null; - DataStreamDescriptorAction = null; - DataStreamDescriptor = descriptor; - return Self; - } - - public IndexTemplateDescriptor DataStream(Action configure) - { - DataStreamValue = null; - DataStreamDescriptor = null; - DataStreamDescriptorAction = configure; - return Self; - } - - /// - /// Name of the index template. - /// - public IndexTemplateDescriptor IndexPatterns(Elastic.Clients.Elasticsearch.Names indexPatterns) - { - IndexPatternsValue = indexPatterns; - return Self; - } - - /// - /// Optional user metadata about the index template. May have any contents.
This map is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Meta(Func, FluentDictionary> selector) - { - MetaValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - - /// - /// Priority to determine index template precedence when a new data stream or index is created.
The index template with the highest priority is chosen.
If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
This number is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Priority(long? priority) - { - PriorityValue = priority; - return Self; - } - - /// - /// Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
- ///
- public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummary? template) - { - TemplateDescriptor = null; - TemplateDescriptorAction = null; - TemplateValue = template; - return Self; - } - - public IndexTemplateDescriptor Template(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor descriptor) - { - TemplateValue = null; - TemplateDescriptorAction = null; - TemplateDescriptor = descriptor; - return Self; - } - - public IndexTemplateDescriptor Template(Action configure) - { - TemplateValue = null; - TemplateDescriptor = null; - TemplateDescriptorAction = configure; - return Self; - } - - /// - /// Version number used to manage index templates externally.
This number is not automatically generated by Elasticsearch.
- ///
- public IndexTemplateDescriptor Version(long? version) - { - VersionValue = version; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - if (AllowAutoCreateValue.HasValue) - { - writer.WritePropertyName("allow_auto_create"); - writer.WriteBooleanValue(AllowAutoCreateValue.Value); - } - - writer.WritePropertyName("composed_of"); - JsonSerializer.Serialize(writer, ComposedOfValue, options); - if (DataStreamDescriptor is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamDescriptor, options); - } - else if (DataStreamDescriptorAction is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfigurationDescriptor(DataStreamDescriptorAction), options); - } - else if (DataStreamValue is not null) - { - writer.WritePropertyName("data_stream"); - JsonSerializer.Serialize(writer, DataStreamValue, options); - } - - writer.WritePropertyName("index_patterns"); - JsonSerializer.Serialize(writer, IndexPatternsValue, options); - if (MetaValue is not null) - { - writer.WritePropertyName("_meta"); - JsonSerializer.Serialize(writer, MetaValue, options); - } - - if (PriorityValue.HasValue) - { - writer.WritePropertyName("priority"); - writer.WriteNumberValue(PriorityValue.Value); - } - - if (TemplateDescriptor is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateDescriptor, options); - } - else if (TemplateDescriptorAction is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateSummaryDescriptor(TemplateDescriptorAction), options); - } - else if (TemplateValue is not null) - { - writer.WritePropertyName("template"); - JsonSerializer.Serialize(writer, TemplateValue, options); - } - - if (VersionValue.HasValue) - { - writer.WritePropertyName("version"); - writer.WriteNumberValue(VersionValue.Value); - } - - writer.WriteEndObject(); - } + public long? Version { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs index 29b4c361c25..a81d35c5bd8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs @@ -33,59 +33,11 @@ public sealed partial class IndexTemplateDataStreamConfiguration /// If true, the data stream supports custom routing. ///
[JsonInclude, JsonPropertyName("allow_custom_routing")] - public bool? AllowCustomRouting { get; set; } + public bool? AllowCustomRouting { get; init; } /// /// If true, the data stream is hidden. /// [JsonInclude, JsonPropertyName("hidden")] - public bool? Hidden { get; set; } -} - -public sealed partial class IndexTemplateDataStreamConfigurationDescriptor : SerializableDescriptor -{ - internal IndexTemplateDataStreamConfigurationDescriptor(Action configure) => configure.Invoke(this); - - public IndexTemplateDataStreamConfigurationDescriptor() : base() - { - } - - private bool? AllowCustomRoutingValue { get; set; } - private bool? HiddenValue { get; set; } - - /// - /// If true, the data stream supports custom routing. - /// - public IndexTemplateDataStreamConfigurationDescriptor AllowCustomRouting(bool? allowCustomRouting = true) - { - AllowCustomRoutingValue = allowCustomRouting; - return Self; - } - - /// - /// If true, the data stream is hidden. - /// - public IndexTemplateDataStreamConfigurationDescriptor Hidden(bool? hidden = true) - { - HiddenValue = hidden; - return Self; - } - - 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"); - writer.WriteBooleanValue(HiddenValue.Value); - } - - writer.WriteEndObject(); - } + public bool? Hidden { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs index 3396ee7b102..76101931399 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateSummary.g.cs @@ -33,353 +33,20 @@ public sealed partial class IndexTemplateSummary /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
///
[JsonInclude, JsonPropertyName("aliases")] - public IDictionary? Aliases { get; set; } + [ReadOnlyIndexNameDictionaryConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Alias))] + public IReadOnlyDictionary? Aliases { get; init; } [JsonInclude, JsonPropertyName("lifecycle")] - public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; set; } + public Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? Lifecycle { get; init; } /// /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
///
[JsonInclude, JsonPropertyName("mappings")] - public Elastic.Clients.Elasticsearch.Mapping.TypeMapping? Mappings { get; set; } + public Elastic.Clients.Elasticsearch.Mapping.TypeMapping? Mappings { get; init; } /// /// Configuration options for the index. /// [JsonInclude, JsonPropertyName("settings")] - public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? Settings { get; set; } -} - -public sealed partial class IndexTemplateSummaryDescriptor : SerializableDescriptor> -{ - internal IndexTemplateSummaryDescriptor(Action> configure) => configure.Invoke(this); - - public IndexTemplateSummaryDescriptor() : base() - { - } - - private IDictionary> AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action> MappingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action> SettingsDescriptorAction { get; set; } - - /// - /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
- ///
- public IndexTemplateSummaryDescriptor Aliases(Func>, FluentDescriptorDictionary>> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary>()); - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - /// - /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
- ///
- public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Mappings(Action> configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// Configuration options for the index. - /// - public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Settings(Action> configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - 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 (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, 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.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - 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.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } -} - -public sealed partial class IndexTemplateSummaryDescriptor : SerializableDescriptor -{ - internal IndexTemplateSummaryDescriptor(Action configure) => configure.Invoke(this); - - public IndexTemplateSummaryDescriptor() : base() - { - } - - private IDictionary AliasesValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? LifecycleValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor LifecycleDescriptor { get; set; } - private Action LifecycleDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.TypeMapping? MappingsValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; } - private Action MappingsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? SettingsValue { get; set; } - private Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; } - private Action SettingsDescriptorAction { get; set; } - - /// - /// Aliases to add.
If the index template includes a `data_stream` object, these are data stream aliases.
Otherwise, these are index aliases.
Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
- ///
- public IndexTemplateSummaryDescriptor Aliases(Func, FluentDescriptorDictionary> selector) - { - AliasesValue = selector?.Invoke(new FluentDescriptorDictionary()); - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRollover? lifecycle) - { - LifecycleDescriptor = null; - LifecycleDescriptorAction = null; - LifecycleValue = lifecycle; - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor descriptor) - { - LifecycleValue = null; - LifecycleDescriptorAction = null; - LifecycleDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Lifecycle(Action configure) - { - LifecycleValue = null; - LifecycleDescriptor = null; - LifecycleDescriptorAction = configure; - return Self; - } - - /// - /// Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping parameters.
- ///
- public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMapping? mappings) - { - MappingsDescriptor = null; - MappingsDescriptorAction = null; - MappingsValue = mappings; - return Self; - } - - public IndexTemplateSummaryDescriptor Mappings(Elastic.Clients.Elasticsearch.Mapping.TypeMappingDescriptor descriptor) - { - MappingsValue = null; - MappingsDescriptorAction = null; - MappingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Mappings(Action configure) - { - MappingsValue = null; - MappingsDescriptor = null; - MappingsDescriptorAction = configure; - return Self; - } - - /// - /// Configuration options for the index. - /// - public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? settings) - { - SettingsDescriptor = null; - SettingsDescriptorAction = null; - SettingsValue = settings; - return Self; - } - - public IndexTemplateSummaryDescriptor Settings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor descriptor) - { - SettingsValue = null; - SettingsDescriptorAction = null; - SettingsDescriptor = descriptor; - return Self; - } - - public IndexTemplateSummaryDescriptor Settings(Action configure) - { - SettingsValue = null; - SettingsDescriptor = null; - SettingsDescriptorAction = configure; - 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 (LifecycleDescriptor is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleDescriptor, options); - } - else if (LifecycleDescriptorAction is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycleWithRolloverDescriptor(LifecycleDescriptorAction), options); - } - else if (LifecycleValue is not null) - { - writer.WritePropertyName("lifecycle"); - JsonSerializer.Serialize(writer, LifecycleValue, 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.Mapping.TypeMappingDescriptor(MappingsDescriptorAction), options); - } - else if (MappingsValue is not null) - { - writer.WritePropertyName("mappings"); - JsonSerializer.Serialize(writer, MappingsValue, options); - } - - 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.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options); - } - else if (SettingsValue is not null) - { - writer.WritePropertyName("settings"); - JsonSerializer.Serialize(writer, SettingsValue, options); - } - - writer.WriteEndObject(); - } + public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? Settings { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs index b630ba73846..760d2b8113a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs @@ -30,7 +30,7 @@ namespace Elastic.Clients.Elasticsearch; public sealed partial class KnnQuery { /// - /// Boost value to apply to kNN scores + /// Floating point number used to decrease or increase the relevance scores of the query.
Boost values are relative to the default value of 1.0.
A boost value between 0 and 1.0 decreases the relevance score.
A value greater than 1.0 increases the relevance score.
///
[JsonInclude, JsonPropertyName("boost")] public float? Boost { get; set; } @@ -48,23 +48,13 @@ public sealed partial class KnnQuery [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] public ICollection? Filter { get; set; } - /// - /// If defined, each search hit will contain inner hits. - /// - [JsonInclude, JsonPropertyName("inner_hits")] - public Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHits { get; set; } - - /// - /// The final number of nearest neighbors to return as top hits - /// - [JsonInclude, JsonPropertyName("k")] - public long k { get; set; } - /// /// The number of nearest neighbor candidates to consider per shard /// [JsonInclude, JsonPropertyName("num_candidates")] - public long NumCandidates { get; set; } + public long? NumCandidates { get; set; } + [JsonInclude, JsonPropertyName("_name")] + public string? QueryName { get; set; } /// /// The query vector @@ -101,11 +91,8 @@ public KnnQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action> FilterDescriptorAction { get; set; } private Action>[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } - private long kValue { get; set; } - private long NumCandidatesValue { get; set; } + private long? NumCandidatesValue { get; set; } + private string? QueryNameValue { get; set; } private ICollection? QueryVectorValue { get; set; } private Elastic.Clients.Elasticsearch.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } private Elastic.Clients.Elasticsearch.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } @@ -113,7 +100,7 @@ public KnnQueryDescriptor() : base() private float? SimilarityValue { get; set; } /// - /// Boost value to apply to kNN scores + /// Floating point number used to decrease or increase the relevance scores of the query.
Boost values are relative to the default value of 1.0.
A boost value between 0 and 1.0 decreases the relevance score.
A value greater than 1.0 increases the relevance score.
///
public KnnQueryDescriptor Boost(float? boost) { @@ -188,47 +175,17 @@ public KnnQueryDescriptor Filter(params Action - /// If defined, each search hit will contain inner hits. - ///
- public KnnQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public KnnQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public KnnQueryDescriptor InnerHits(Action> configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// The final number of nearest neighbors to return as top hits + /// The number of nearest neighbor candidates to consider per shard /// - public KnnQueryDescriptor k(long k) + public KnnQueryDescriptor NumCandidates(long? numCandidates) { - kValue = k; + NumCandidatesValue = numCandidates; return Self; } - /// - /// The number of nearest neighbor candidates to consider per shard - /// - public KnnQueryDescriptor NumCandidates(long numCandidates) + public KnnQueryDescriptor QueryName(string? queryName) { - NumCandidatesValue = numCandidates; + QueryNameValue = queryName; return Self; } @@ -317,26 +274,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (InnerHitsDescriptor is not null) + if (NumCandidatesValue.HasValue) { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue.Value); } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) + + if (!string.IsNullOrEmpty(QueryNameValue)) { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); } - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue); - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue); if (QueryVectorValue is not null) { writer.WritePropertyName("query_vector"); @@ -383,11 +332,8 @@ public KnnQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } private Action FilterDescriptorAction { get; set; } private Action[] FilterDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } - private Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } - private long kValue { get; set; } - private long NumCandidatesValue { get; set; } + private long? NumCandidatesValue { get; set; } + private string? QueryNameValue { get; set; } private ICollection? QueryVectorValue { get; set; } private Elastic.Clients.Elasticsearch.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } private Elastic.Clients.Elasticsearch.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } @@ -395,7 +341,7 @@ public KnnQueryDescriptor() : base() private float? SimilarityValue { get; set; } /// - /// Boost value to apply to kNN scores + /// Floating point number used to decrease or increase the relevance scores of the query.
Boost values are relative to the default value of 1.0.
A boost value between 0 and 1.0 decreases the relevance score.
A value greater than 1.0 increases the relevance score.
///
public KnnQueryDescriptor Boost(float? boost) { @@ -470,47 +416,17 @@ public KnnQueryDescriptor Filter(params Action - /// If defined, each search hit will contain inner hits. - ///
- public KnnQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) - { - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = null; - InnerHitsValue = innerHits; - return Self; - } - - public KnnQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor descriptor) - { - InnerHitsValue = null; - InnerHitsDescriptorAction = null; - InnerHitsDescriptor = descriptor; - return Self; - } - - public KnnQueryDescriptor InnerHits(Action configure) - { - InnerHitsValue = null; - InnerHitsDescriptor = null; - InnerHitsDescriptorAction = configure; - return Self; - } - - /// - /// The final number of nearest neighbors to return as top hits + /// The number of nearest neighbor candidates to consider per shard /// - public KnnQueryDescriptor k(long k) + public KnnQueryDescriptor NumCandidates(long? numCandidates) { - kValue = k; + NumCandidatesValue = numCandidates; return Self; } - /// - /// The number of nearest neighbor candidates to consider per shard - /// - public KnnQueryDescriptor NumCandidates(long numCandidates) + public KnnQueryDescriptor QueryName(string? queryName) { - NumCandidatesValue = numCandidates; + QueryNameValue = queryName; return Self; } @@ -599,26 +515,18 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); } - if (InnerHitsDescriptor is not null) + if (NumCandidatesValue.HasValue) { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue.Value); } - else if (InnerHitsDescriptorAction is not null) - { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); - } - else if (InnerHitsValue is not null) + + if (!string.IsNullOrEmpty(QueryNameValue)) { - writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, InnerHitsValue, options); + writer.WritePropertyName("_name"); + writer.WriteStringValue(QueryNameValue); } - writer.WritePropertyName("k"); - writer.WriteNumberValue(kValue); - writer.WritePropertyName("num_candidates"); - writer.WriteNumberValue(NumCandidatesValue); if (QueryVectorValue is not null) { writer.WritePropertyName("query_vector"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs new file mode 100644 index 00000000000..31654f91bd5 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs @@ -0,0 +1,666 @@ +// 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.Fluent; +using Elastic.Clients.Elasticsearch.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +public sealed partial class KnnSearch +{ + /// + /// Boost value to apply to kNN scores + /// + [JsonInclude, JsonPropertyName("boost")] + public float? Boost { get; set; } + + /// + /// The name of the vector field to search against + /// + [JsonInclude, JsonPropertyName("field")] + public Elastic.Clients.Elasticsearch.Field Field { get; set; } + + /// + /// Filters for the kNN search query + /// + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.Query))] + public ICollection? Filter { get; set; } + + /// + /// If defined, each search hit will contain inner hits. + /// + [JsonInclude, JsonPropertyName("inner_hits")] + public Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHits { get; set; } + + /// + /// The final number of nearest neighbors to return as top hits + /// + [JsonInclude, JsonPropertyName("k")] + public long? k { get; set; } + + /// + /// The number of nearest neighbor candidates to consider per shard + /// + [JsonInclude, JsonPropertyName("num_candidates")] + public long? NumCandidates { get; set; } + + /// + /// The query vector + /// + [JsonInclude, JsonPropertyName("query_vector")] + public ICollection? QueryVector { get; set; } + + /// + /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. + /// + [JsonInclude, JsonPropertyName("query_vector_builder")] + public Elastic.Clients.Elasticsearch.QueryVectorBuilder? QueryVectorBuilder { get; set; } + + /// + /// The minimum similarity for a vector to be considered a match + /// + [JsonInclude, JsonPropertyName("similarity")] + public float? Similarity { get; set; } +} + +public sealed partial class KnnSearchDescriptor : SerializableDescriptor> +{ + internal KnnSearchDescriptor(Action> configure) => configure.Invoke(this); + + public KnnSearchDescriptor() : base() + { + } + + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private ICollection? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action> FilterDescriptorAction { get; set; } + private Action>[] FilterDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Action> InnerHitsDescriptorAction { get; set; } + private long? kValue { get; set; } + private long? NumCandidatesValue { get; set; } + private ICollection? QueryVectorValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } + private Action QueryVectorBuilderDescriptorAction { get; set; } + private float? SimilarityValue { get; set; } + + /// + /// Boost value to apply to kNN scores + /// + public KnnSearchDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// Filters for the kNN search query + /// + public KnnSearchDescriptor Filter(ICollection? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterValue = filter; + return Self; + } + + public KnnSearchDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorActions = null; + FilterDescriptorAction = configure; + return Self; + } + + public KnnSearchDescriptor Filter(params Action>[] configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = configure; + return Self; + } + + /// + /// If defined, each search hit will contain inner hits. + /// + public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) + { + InnerHitsDescriptor = null; + InnerHitsDescriptorAction = null; + InnerHitsValue = innerHits; + return Self; + } + + public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor descriptor) + { + InnerHitsValue = null; + InnerHitsDescriptorAction = null; + InnerHitsDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor InnerHits(Action> configure) + { + InnerHitsValue = null; + InnerHitsDescriptor = null; + InnerHitsDescriptorAction = configure; + return Self; + } + + /// + /// The final number of nearest neighbors to return as top hits + /// + public KnnSearchDescriptor k(long? k) + { + kValue = k; + return Self; + } + + /// + /// The number of nearest neighbor candidates to consider per shard + /// + public KnnSearchDescriptor NumCandidates(long? numCandidates) + { + NumCandidatesValue = numCandidates; + return Self; + } + + /// + /// The query vector + /// + public KnnSearchDescriptor QueryVector(ICollection? queryVector) + { + QueryVectorValue = queryVector; + return Self; + } + + /// + /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. + /// + public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.QueryVectorBuilder? queryVectorBuilder) + { + QueryVectorBuilderDescriptor = null; + QueryVectorBuilderDescriptorAction = null; + QueryVectorBuilderValue = queryVectorBuilder; + return Self; + } + + public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.QueryVectorBuilderDescriptor descriptor) + { + QueryVectorBuilderValue = null; + QueryVectorBuilderDescriptorAction = null; + QueryVectorBuilderDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor QueryVectorBuilder(Action configure) + { + QueryVectorBuilderValue = null; + QueryVectorBuilderDescriptor = null; + QueryVectorBuilderDescriptorAction = configure; + return Self; + } + + /// + /// The minimum similarity for a vector to be considered a match + /// + public KnnSearchDescriptor Similarity(float? similarity) + { + SimilarityValue = similarity; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterDescriptorActions is not null) + { + writer.WritePropertyName("filter"); + if (FilterDescriptorActions.Length != 1) + writer.WriteStartArray(); + foreach (var action in FilterDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor(action), options); + } + + if (FilterDescriptorActions.Length != 1) + writer.WriteEndArray(); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); + } + + if (InnerHitsDescriptor is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); + } + else if (InnerHitsDescriptorAction is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); + } + else if (InnerHitsValue is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, InnerHitsValue, options); + } + + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + if (NumCandidatesValue.HasValue) + { + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue.Value); + } + + if (QueryVectorValue is not null) + { + writer.WritePropertyName("query_vector"); + JsonSerializer.Serialize(writer, QueryVectorValue, options); + } + + if (QueryVectorBuilderDescriptor is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); + } + else if (QueryVectorBuilderDescriptorAction is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); + } + else if (QueryVectorBuilderValue is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); + } + + if (SimilarityValue.HasValue) + { + writer.WritePropertyName("similarity"); + writer.WriteNumberValue(SimilarityValue.Value); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class KnnSearchDescriptor : SerializableDescriptor +{ + internal KnnSearchDescriptor(Action configure) => configure.Invoke(this); + + public KnnSearchDescriptor() : base() + { + } + + private float? BoostValue { get; set; } + private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } + private ICollection? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } + private Action[] FilterDescriptorActions { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Action InnerHitsDescriptorAction { get; set; } + private long? kValue { get; set; } + private long? NumCandidatesValue { get; set; } + private ICollection? QueryVectorValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryVectorBuilder? QueryVectorBuilderValue { get; set; } + private Elastic.Clients.Elasticsearch.QueryVectorBuilderDescriptor QueryVectorBuilderDescriptor { get; set; } + private Action QueryVectorBuilderDescriptorAction { get; set; } + private float? SimilarityValue { get; set; } + + /// + /// Boost value to apply to kNN scores + /// + public KnnSearchDescriptor Boost(float? boost) + { + BoostValue = boost; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Elastic.Clients.Elasticsearch.Field field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// The name of the vector field to search against + /// + public KnnSearchDescriptor Field(Expression> field) + { + FieldValue = field; + return Self; + } + + /// + /// Filters for the kNN search query + /// + public KnnSearchDescriptor Filter(ICollection? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterValue = filter; + return Self; + } + + public KnnSearchDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorActions = null; + FilterDescriptorAction = configure; + return Self; + } + + public KnnSearchDescriptor Filter(params Action[] configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = configure; + return Self; + } + + /// + /// If defined, each search hit will contain inner hits. + /// + public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) + { + InnerHitsDescriptor = null; + InnerHitsDescriptorAction = null; + InnerHitsValue = innerHits; + return Self; + } + + public KnnSearchDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor descriptor) + { + InnerHitsValue = null; + InnerHitsDescriptorAction = null; + InnerHitsDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor InnerHits(Action configure) + { + InnerHitsValue = null; + InnerHitsDescriptor = null; + InnerHitsDescriptorAction = configure; + return Self; + } + + /// + /// The final number of nearest neighbors to return as top hits + /// + public KnnSearchDescriptor k(long? k) + { + kValue = k; + return Self; + } + + /// + /// The number of nearest neighbor candidates to consider per shard + /// + public KnnSearchDescriptor NumCandidates(long? numCandidates) + { + NumCandidatesValue = numCandidates; + return Self; + } + + /// + /// The query vector + /// + public KnnSearchDescriptor QueryVector(ICollection? queryVector) + { + QueryVectorValue = queryVector; + return Self; + } + + /// + /// The query vector builder. You must provide a query_vector_builder or query_vector, but not both. + /// + public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.QueryVectorBuilder? queryVectorBuilder) + { + QueryVectorBuilderDescriptor = null; + QueryVectorBuilderDescriptorAction = null; + QueryVectorBuilderValue = queryVectorBuilder; + return Self; + } + + public KnnSearchDescriptor QueryVectorBuilder(Elastic.Clients.Elasticsearch.QueryVectorBuilderDescriptor descriptor) + { + QueryVectorBuilderValue = null; + QueryVectorBuilderDescriptorAction = null; + QueryVectorBuilderDescriptor = descriptor; + return Self; + } + + public KnnSearchDescriptor QueryVectorBuilder(Action configure) + { + QueryVectorBuilderValue = null; + QueryVectorBuilderDescriptor = null; + QueryVectorBuilderDescriptorAction = configure; + return Self; + } + + /// + /// The minimum similarity for a vector to be considered a match + /// + public KnnSearchDescriptor Similarity(float? similarity) + { + SimilarityValue = similarity; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (BoostValue.HasValue) + { + writer.WritePropertyName("boost"); + writer.WriteNumberValue(BoostValue.Value); + } + + writer.WritePropertyName("field"); + JsonSerializer.Serialize(writer, FieldValue, options); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterDescriptorActions is not null) + { + writer.WritePropertyName("filter"); + if (FilterDescriptorActions.Length != 1) + writer.WriteStartArray(); + foreach (var action in FilterDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor(action), options); + } + + if (FilterDescriptorActions.Length != 1) + writer.WriteEndArray(); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); + } + + if (InnerHitsDescriptor is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, InnerHitsDescriptor, options); + } + else if (InnerHitsDescriptorAction is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); + } + else if (InnerHitsValue is not null) + { + writer.WritePropertyName("inner_hits"); + JsonSerializer.Serialize(writer, InnerHitsValue, options); + } + + if (kValue.HasValue) + { + writer.WritePropertyName("k"); + writer.WriteNumberValue(kValue.Value); + } + + if (NumCandidatesValue.HasValue) + { + writer.WritePropertyName("num_candidates"); + writer.WriteNumberValue(NumCandidatesValue.Value); + } + + if (QueryVectorValue is not null) + { + writer.WritePropertyName("query_vector"); + JsonSerializer.Serialize(writer, QueryVectorValue, options); + } + + if (QueryVectorBuilderDescriptor is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, QueryVectorBuilderDescriptor, options); + } + else if (QueryVectorBuilderDescriptorAction is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.QueryVectorBuilderDescriptor(QueryVectorBuilderDescriptorAction), options); + } + else if (QueryVectorBuilderValue is not null) + { + writer.WritePropertyName("query_vector_builder"); + JsonSerializer.Serialize(writer, QueryVectorBuilderValue, options); + } + + if (SimilarityValue.HasValue) + { + writer.WritePropertyName("similarity"); + writer.WriteNumberValue(SimilarityValue.Value); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs index 96b7efc6fcd..dcb6f1e55be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs @@ -98,7 +98,7 @@ public sealed partial class DynamicProperty : IProperty public Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? TimeSeriesMetric { get; set; } [JsonInclude, JsonPropertyName("type")] - public string Type => "{dynamic_property}"; + public string Type => "{dynamic_type}"; } public sealed partial class DynamicPropertyDescriptor : SerializableDescriptor>, IBuildableDescriptor @@ -578,7 +578,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } writer.WritePropertyName("type"); - writer.WriteStringValue("{dynamic_property}"); + writer.WriteStringValue("{dynamic_type}"); writer.WriteEndObject(); } @@ -1119,7 +1119,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } writer.WritePropertyName("type"); - writer.WriteStringValue("{dynamic_property}"); + writer.WriteStringValue("{dynamic_type}"); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs index 15bfac73651..9f5a2f45035 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Properties.g.cs @@ -341,7 +341,7 @@ public override IProperty Read(ref Utf8JsonReader reader, Type typeToConvert, Js return JsonSerializer.Deserialize(ref reader, options); case "double_range": return JsonSerializer.Deserialize(ref reader, options); - case "{dynamic_property}": + case "{dynamic_type}": return JsonSerializer.Deserialize(ref reader, options); case "alias": return JsonSerializer.Deserialize(ref reader, options); @@ -462,7 +462,7 @@ public override void Write(Utf8JsonWriter writer, IProperty value, JsonSerialize case "double_range": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty), options); return; - case "{dynamic_property}": + case "{dynamic_type}": JsonSerializer.Serialize(writer, value, typeof(Elastic.Clients.Elasticsearch.Mapping.DynamicProperty), options); return; case "alias": diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryCacheStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryCacheStats.g.cs index dbbefc40e1c..11fb80f3e46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryCacheStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryCacheStats.g.cs @@ -33,25 +33,25 @@ public sealed partial class QueryCacheStats /// Total number of entries added to the query cache across all shards assigned to selected nodes.
This number includes current and evicted entries.
///
[JsonInclude, JsonPropertyName("cache_count")] - public int CacheCount { get; init; } + public long CacheCount { get; init; } /// /// Total number of entries currently in the query cache across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("cache_size")] - public int CacheSize { get; init; } + public long CacheSize { get; init; } /// /// Total number of query cache evictions across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("evictions")] - public int Evictions { get; init; } + public long Evictions { get; init; } /// /// Total count of query cache hits across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("hit_count")] - public int HitCount { get; init; } + public long HitCount { get; init; } /// /// Total amount of memory used for the query cache across all shards assigned to selected nodes. @@ -69,11 +69,11 @@ public sealed partial class QueryCacheStats /// Total count of query cache misses across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("miss_count")] - public int MissCount { get; init; } + public long MissCount { get; init; } /// /// Total count of hits and misses in the query cache across all shards assigned to selected nodes. /// [JsonInclude, JsonPropertyName("total_count")] - public int TotalCount { get; init; } + public long TotalCount { get; init; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs index 65c3dd7969b..935866319d6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs @@ -49,6 +49,10 @@ public sealed partial class LikeDocument ///
[JsonInclude, JsonPropertyName("_index")] public Elastic.Clients.Elasticsearch.IndexName? Index { get; set; } + + /// + /// Overrides the default analyzer. + /// [JsonInclude, JsonPropertyName("per_field_analyzer")] public IDictionary? PerFieldAnalyzer { get; set; } [JsonInclude, JsonPropertyName("routing")] @@ -109,6 +113,9 @@ public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.Ind return Self; } + /// + /// Overrides the default analyzer. + /// public LikeDocumentDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) { PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); @@ -238,6 +245,9 @@ public LikeDocumentDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? ind return Self; } + /// + /// Overrides the default analyzer. + /// public LikeDocumentDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) { PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs index af18b10b190..972fa3f37b8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs @@ -114,12 +114,6 @@ public sealed partial class MoreLikeThisQuery ///
[JsonInclude, JsonPropertyName("min_word_length")] public int? MinWordLength { get; set; } - - /// - /// Overrides the default analyzer. - /// - [JsonInclude, JsonPropertyName("per_field_analyzer")] - public IDictionary? PerFieldAnalyzer { get; set; } [JsonInclude, JsonPropertyName("_name")] public string? QueryName { get; set; } [JsonInclude, JsonPropertyName("routing")] @@ -168,7 +162,6 @@ public MoreLikeThisQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private int? MinTermFreqValue { get; set; } private int? MinWordLengthValue { get; set; } - private IDictionary? PerFieldAnalyzerValue { get; set; } private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private ICollection? StopWordsValue { get; set; } @@ -302,15 +295,6 @@ public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) return Self; } - /// - /// Overrides the default analyzer. - /// - public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) - { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public MoreLikeThisQueryDescriptor QueryName(string? queryName) { QueryNameValue = queryName; @@ -436,12 +420,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinWordLengthValue.Value); } - if (PerFieldAnalyzerValue is not null) - { - writer.WritePropertyName("per_field_analyzer"); - JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); - } - if (!string.IsNullOrEmpty(QueryNameValue)) { writer.WritePropertyName("_name"); @@ -504,7 +482,6 @@ public MoreLikeThisQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.MinimumShouldMatch? MinimumShouldMatchValue { get; set; } private int? MinTermFreqValue { get; set; } private int? MinWordLengthValue { get; set; } - private IDictionary? PerFieldAnalyzerValue { get; set; } private string? QueryNameValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } private ICollection? StopWordsValue { get; set; } @@ -638,15 +615,6 @@ public MoreLikeThisQueryDescriptor MinWordLength(int? minWordLength) return Self; } - /// - /// Overrides the default analyzer. - /// - public MoreLikeThisQueryDescriptor PerFieldAnalyzer(Func, FluentDictionary> selector) - { - PerFieldAnalyzerValue = selector?.Invoke(new FluentDictionary()); - return Self; - } - public MoreLikeThisQueryDescriptor QueryName(string? queryName) { QueryNameValue = queryName; @@ -772,12 +740,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(MinWordLengthValue.Value); } - if (PerFieldAnalyzerValue is not null) - { - writer.WritePropertyName("per_field_analyzer"); - JsonSerializer.Serialize(writer, PerFieldAnalyzerValue, options); - } - if (!string.IsNullOrEmpty(QueryNameValue)) { writer.WritePropertyName("_name");