diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.Converters.g.cs index 68a5d01d53a..1662471fed6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.Converters.g.cs @@ -29,6 +29,7 @@ public sealed partial class AsyncSearchStatusResponseConverter : System.Text.Jso private static readonly System.Text.Json.JsonEncodedText PropCompletionStatus = System.Text.Json.JsonEncodedText.Encode("completion_status"); private static readonly System.Text.Json.JsonEncodedText PropCompletionTime = System.Text.Json.JsonEncodedText.Encode("completion_time"); private static readonly System.Text.Json.JsonEncodedText PropCompletionTimeInMillis = System.Text.Json.JsonEncodedText.Encode("completion_time_in_millis"); + private static readonly System.Text.Json.JsonEncodedText PropError = System.Text.Json.JsonEncodedText.Encode("error"); private static readonly System.Text.Json.JsonEncodedText PropExpirationTime = System.Text.Json.JsonEncodedText.Encode("expiration_time"); private static readonly System.Text.Json.JsonEncodedText PropExpirationTimeInMillis = System.Text.Json.JsonEncodedText.Encode("expiration_time_in_millis"); private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id"); @@ -45,6 +46,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearchStatusRespo LocalJsonValue propCompletionStatus = default; LocalJsonValue propCompletionTime = default; LocalJsonValue propCompletionTimeInMillis = default; + LocalJsonValue propError = default; LocalJsonValue propExpirationTime = default; LocalJsonValue propExpirationTimeInMillis = default; LocalJsonValue propId = default; @@ -75,6 +77,11 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearchStatusRespo continue; } + if (propError.TryReadProperty(ref reader, options, PropError, null)) + { + continue; + } + if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; @@ -131,6 +138,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearchStatusRespo CompletionStatus = propCompletionStatus.Value, CompletionTime = propCompletionTime.Value, CompletionTimeInMillis = propCompletionTimeInMillis.Value, + Error = propError.Value, ExpirationTime = propExpirationTime.Value, ExpirationTimeInMillis = propExpirationTimeInMillis.Value, Id = propId.Value, @@ -149,6 +157,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropError, value.Error, null, null); writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs index 9610d6a9a60..a463956f8b1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs @@ -62,6 +62,7 @@ internal AsyncSearchStatusResponse(Elastic.Clients.Elasticsearch.Serialization.J /// public System.DateTimeOffset? CompletionTime { get; set; } public System.DateTimeOffset? CompletionTimeInMillis { get; set; } + public Elastic.Clients.Elasticsearch.ErrorCause? Error { get; set; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.Converters.g.cs index 1dc894d73c2..ba22190bddd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.Converters.g.cs @@ -27,6 +27,7 @@ public sealed partial class GetAsyncSearchResponseConverter : System. { private static readonly System.Text.Json.JsonEncodedText PropCompletionTime = System.Text.Json.JsonEncodedText.Encode("completion_time"); private static readonly System.Text.Json.JsonEncodedText PropCompletionTimeInMillis = System.Text.Json.JsonEncodedText.Encode("completion_time_in_millis"); + private static readonly System.Text.Json.JsonEncodedText PropError = System.Text.Json.JsonEncodedText.Encode("error"); private static readonly System.Text.Json.JsonEncodedText PropExpirationTime = System.Text.Json.JsonEncodedText.Encode("expiration_time"); private static readonly System.Text.Json.JsonEncodedText PropExpirationTimeInMillis = System.Text.Json.JsonEncodedText.Encode("expiration_time_in_millis"); private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id"); @@ -41,6 +42,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propCompletionTime = default; LocalJsonValue propCompletionTimeInMillis = default; + LocalJsonValue propError = default; LocalJsonValue propExpirationTime = default; LocalJsonValue propExpirationTimeInMillis = default; LocalJsonValue propId = default; @@ -61,6 +63,11 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse continue; } + if (propError.TryReadProperty(ref reader, options, PropError, null)) + { + continue; + } + if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; @@ -115,6 +122,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse { CompletionTime = propCompletionTime.Value, CompletionTimeInMillis = propCompletionTimeInMillis.Value, + Error = propError.Value, ExpirationTime = propExpirationTime.Value, ExpirationTimeInMillis = propExpirationTimeInMillis.Value, Id = propId.Value, @@ -131,6 +139,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropError, value.Error, null, null); writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs index 9d379a1f20d..836a7ac0f9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs @@ -45,6 +45,7 @@ internal GetAsyncSearchResponse(Elastic.Clients.Elasticsearch.Serialization.Json /// public System.DateTimeOffset? CompletionTime { get; set; } public System.DateTimeOffset? CompletionTimeInMillis { get; set; } + public Elastic.Clients.Elasticsearch.ErrorCause? Error { get; set; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.Converters.g.cs index ba5eed86942..e6b5fc37708 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.Converters.g.cs @@ -27,6 +27,7 @@ public sealed partial class SubmitAsyncSearchResponseConverter : Syst { private static readonly System.Text.Json.JsonEncodedText PropCompletionTime = System.Text.Json.JsonEncodedText.Encode("completion_time"); private static readonly System.Text.Json.JsonEncodedText PropCompletionTimeInMillis = System.Text.Json.JsonEncodedText.Encode("completion_time_in_millis"); + private static readonly System.Text.Json.JsonEncodedText PropError = System.Text.Json.JsonEncodedText.Encode("error"); private static readonly System.Text.Json.JsonEncodedText PropExpirationTime = System.Text.Json.JsonEncodedText.Encode("expiration_time"); private static readonly System.Text.Json.JsonEncodedText PropExpirationTimeInMillis = System.Text.Json.JsonEncodedText.Encode("expiration_time_in_millis"); private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id"); @@ -41,6 +42,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRespo reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propCompletionTime = default; LocalJsonValue propCompletionTimeInMillis = default; + LocalJsonValue propError = default; LocalJsonValue propExpirationTime = default; LocalJsonValue propExpirationTimeInMillis = default; LocalJsonValue propId = default; @@ -61,6 +63,11 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRespo continue; } + if (propError.TryReadProperty(ref reader, options, PropError, null)) + { + continue; + } + if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; @@ -115,6 +122,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRespo { CompletionTime = propCompletionTime.Value, CompletionTimeInMillis = propCompletionTimeInMillis.Value, + Error = propError.Value, ExpirationTime = propExpirationTime.Value, ExpirationTimeInMillis = propExpirationTimeInMillis.Value, Id = propId.Value, @@ -131,6 +139,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropError, value.Error, null, null); writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs index 30bbe4819ab..50844509f41 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs @@ -45,6 +45,7 @@ internal SubmitAsyncSearchResponse(Elastic.Clients.Elasticsearch.Serialization.J /// public System.DateTimeOffset? CompletionTime { get; set; } public System.DateTimeOffset? CompletionTimeInMillis { get; set; } + public Elastic.Clients.Elasticsearch.ErrorCause? Error { get; set; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs index 95e09ef3afb..0f3d6393fec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs @@ -247,6 +247,11 @@ public sealed partial class BulkRequestParameters : Elastic.Transport.RequestPar /// /// /// +/// Java: Check out co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester +/// +/// +/// +/// /// .NET: Check out BulkAllObservable /// /// @@ -577,6 +582,11 @@ internal BulkRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructor /// /// /// +/// Java: Check out co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester +/// +/// +/// +/// /// .NET: Check out BulkAllObservable /// /// @@ -1057,6 +1067,11 @@ public Elastic.Clients.Elasticsearch.BulkRequestDescriptor RequestConfiguration( /// /// /// +/// Java: Check out co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester +/// +/// +/// +/// /// .NET: Check out BulkAllObservable /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs index e1f1e3678e0..2275a1fcaef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ExistsComponentTemplateRequest.g.cs @@ -31,6 +31,7 @@ public sealed partial class ExistsComponentTemplateRequestParameters : Elastic.T /// Defaults to false, which means information is retrieved from the master node. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -93,6 +94,7 @@ internal ExistsComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serializat /// Defaults to false, which means information is retrieved from the master node. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -147,6 +149,7 @@ public Elastic.Clients.Elasticsearch.Cluster.ExistsComponentTemplateRequestDescr return this; } + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] /// /// /// If true, the request retrieves information from the local node only. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs index 5bc384ee08c..2f6544dcafb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetComponentTemplateRequest.g.cs @@ -45,6 +45,7 @@ public sealed partial class GetComponentTemplateRequestParameters : Elastic.Tran /// If false, information is retrieved from the master node. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -127,6 +128,7 @@ internal GetComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serialization /// If false, information is retrieved from the master node. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -208,6 +210,7 @@ public Elastic.Clients.Elasticsearch.Cluster.GetComponentTemplateRequestDescript return this; } + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] /// /// /// If true, the request retrieves information from the local node only. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs index a58336f781b..8d656739a7a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs @@ -220,7 +220,7 @@ internal EqlSearchRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// /// - /// Field containing event timestamp. Default "@timestamp" + /// Field containing event timestamp. /// /// public Elastic.Clients.Elasticsearch.Field? TimestampField { get; set; } @@ -646,7 +646,7 @@ public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor TiebreakerFi /// /// - /// Field containing event timestamp. Default "@timestamp" + /// Field containing event timestamp. /// /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor TimestampField(Elastic.Clients.Elasticsearch.Field? value) @@ -657,7 +657,7 @@ public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor TimestampFie /// /// - /// Field containing event timestamp. Default "@timestamp" + /// Field containing event timestamp. /// /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor TimestampField(System.Linq.Expressions.Expression> value) @@ -1089,7 +1089,7 @@ public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor T /// /// - /// Field containing event timestamp. Default "@timestamp" + /// Field containing event timestamp. /// /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor TimestampField(Elastic.Clients.Elasticsearch.Field? value) @@ -1100,7 +1100,7 @@ public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor T /// /// - /// Field containing event timestamp. Default "@timestamp" + /// Field containing event timestamp. /// /// public Elastic.Clients.Elasticsearch.Eql.EqlSearchRequestDescriptor TimestampField(System.Linq.Expressions.Expression> value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs index 886289e29e1..b6f0158cfc2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsTemplateRequest.g.cs @@ -37,6 +37,7 @@ public sealed partial class ExistsTemplateRequestParameters : Elastic.Transport. /// Indicates whether to get information from the local node only. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -109,6 +110,7 @@ internal ExistsTemplateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// Indicates whether to get information from the local node only. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -178,6 +180,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.ExistsTemplateRequestDescri return this; } + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] /// /// /// Indicates whether to get information from the local node only. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs index feb86b26269..bef32078215 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexTemplateRequest.g.cs @@ -44,6 +44,7 @@ public sealed partial class GetIndexTemplateRequestParameters : Elastic.Transpor /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -92,7 +93,7 @@ internal GetIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported. + /// Name of index template to retrieve. Wildcard (*) expressions are supported. /// /// public Elastic.Clients.Elasticsearch.Name? Name { get => P("name"); set => PO("name", value); } @@ -116,6 +117,7 @@ internal GetIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -157,7 +159,7 @@ public GetIndexTemplateRequestDescriptor() /// /// - /// Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported. + /// Name of index template to retrieve. Wildcard (*) expressions are supported. /// /// public Elastic.Clients.Elasticsearch.IndexManagement.GetIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name? value) @@ -188,6 +190,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.GetIndexTemplateRequestDesc return this; } + [System.Obsolete("Deprecated in '9.0.0'. This parameter has no effect, is now deprecated, and will be removed in a future version.")] /// /// /// If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs index 318976042b4..516794d4c89 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsRequest.g.cs @@ -72,6 +72,7 @@ public sealed partial class GetIndicesSettingsRequestParameters : Elastic.Transp /// false, information is retrieved from the master node. /// /// + [System.Obsolete("Deprecated in '9.1.0'. This parameter is a no-op and settings are always retrieved locally.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -192,6 +193,7 @@ internal GetIndicesSettingsRequest(Elastic.Clients.Elasticsearch.Serialization.J /// false, information is retrieved from the master node. /// /// + [System.Obsolete("Deprecated in '9.1.0'. This parameter is a no-op and settings are always retrieved locally.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -342,6 +344,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.GetIndicesSettingsRequestDe return this; } + [System.Obsolete("Deprecated in '9.1.0'. This parameter is a no-op and settings are always retrieved locally.")] /// /// /// If true, the request retrieves information from the local node only. If @@ -561,6 +564,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.GetIndicesSettingsRequestDe return this; } + [System.Obsolete("Deprecated in '9.1.0'. This parameter is a no-op and settings are always retrieved locally.")] /// /// /// If true, the request retrieves information from the local node only. If diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs index 354efda3041..fdd3c9d96b8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateRequest.g.cs @@ -37,6 +37,7 @@ public sealed partial class GetTemplateRequestParameters : Elastic.Transport.Req /// If true, the request retrieves information from the local node only. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter is a no-op and templates are always retrieved locally.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -108,6 +109,7 @@ internal GetTemplateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// If true, the request retrieves information from the local node only. /// /// + [System.Obsolete("Deprecated in '9.0.0'. This parameter is a no-op and templates are always retrieved locally.")] public bool? Local { get => Q("local"); set => Q("local", value); } /// @@ -175,6 +177,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.GetTemplateRequestDescripto return this; } + [System.Obsolete("Deprecated in '9.0.0'. This parameter is a no-op and templates are always retrieved locally.")] /// /// /// If true, the request retrieves information from the local node only. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.Converters.g.cs index 4948f97ff5b..b204f771b6c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.Converters.g.cs @@ -35,7 +35,6 @@ public sealed partial class PutJobRequestConverter : System.Text.Json.Serializat private static readonly System.Text.Json.JsonEncodedText PropDatafeedConfig = System.Text.Json.JsonEncodedText.Encode("datafeed_config"); private static readonly System.Text.Json.JsonEncodedText PropDescription = System.Text.Json.JsonEncodedText.Encode("description"); private static readonly System.Text.Json.JsonEncodedText PropGroups = System.Text.Json.JsonEncodedText.Encode("groups"); - private static readonly System.Text.Json.JsonEncodedText PropJobId = System.Text.Json.JsonEncodedText.Encode("job_id"); private static readonly System.Text.Json.JsonEncodedText PropModelPlotConfig = System.Text.Json.JsonEncodedText.Encode("model_plot_config"); private static readonly System.Text.Json.JsonEncodedText PropModelSnapshotRetentionDays = System.Text.Json.JsonEncodedText.Encode("model_snapshot_retention_days"); private static readonly System.Text.Json.JsonEncodedText PropRenormalizationWindowDays = System.Text.Json.JsonEncodedText.Encode("renormalization_window_days"); @@ -55,7 +54,6 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read LocalJsonValue propDatafeedConfig = default; LocalJsonValue propDescription = default; LocalJsonValue?> propGroups = default; - LocalJsonValue propJobId = default; LocalJsonValue propModelPlotConfig = default; LocalJsonValue propModelSnapshotRetentionDays = default; LocalJsonValue propRenormalizationWindowDays = default; @@ -113,11 +111,6 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read continue; } - if (propJobId.TryReadProperty(ref reader, options, PropJobId, null)) - { - continue; - } - if (propModelPlotConfig.TryReadProperty(ref reader, options, PropModelPlotConfig, null)) { continue; @@ -165,7 +158,6 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read DatafeedConfig = propDatafeedConfig.Value, Description = propDescription.Value, Groups = propGroups.Value, - JobId = propJobId.Value, ModelPlotConfig = propModelPlotConfig.Value, ModelSnapshotRetentionDays = propModelSnapshotRetentionDays.Value, RenormalizationWindowDays = propRenormalizationWindowDays.Value, @@ -187,7 +179,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDatafeedConfig, value.DatafeedConfig, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropGroups, value.Groups, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs index f1df73ec206..14d14e74f30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs @@ -69,8 +69,14 @@ public sealed partial class PutJobRequestParameters : Elastic.Transport.RequestP [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.MachineLearning.Json.PutJobRequestConverter))] public sealed partial class PutJobRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest { + [System.Obsolete("The request contains additional required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public PutJobRequest(Elastic.Clients.Elasticsearch.MachineLearning.AnalysisConfig analysisConfig, Elastic.Clients.Elasticsearch.MachineLearning.DataDescription dataDescription) + public PutJobRequest(Elastic.Clients.Elasticsearch.Id jobId) : base(r => r.Required("job_id", jobId)) + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PutJobRequest(Elastic.Clients.Elasticsearch.Id jobId, Elastic.Clients.Elasticsearch.MachineLearning.AnalysisConfig analysisConfig, Elastic.Clients.Elasticsearch.MachineLearning.DataDescription dataDescription) : base(r => r.Required("job_id", jobId)) { AnalysisConfig = analysisConfig; DataDescription = dataDescription; @@ -79,12 +85,6 @@ public PutJobRequest(Elastic.Clients.Elasticsearch.MachineLearning.AnalysisConfi public PutJobRequest() { } -#endif -#if !NET7_0_OR_GREATER - [System.Obsolete("The request contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] - public PutJobRequest() - { - } #endif [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] internal PutJobRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) @@ -100,6 +100,17 @@ internal PutJobRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct internal override string OperationName => "ml.put_job"; + /// + /// + /// The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Id JobId { get => P("job_id"); set => PR("job_id", value); } + /// /// /// If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the @@ -209,13 +220,6 @@ internal PutJobRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// public System.Collections.Generic.ICollection? Groups { get; set; } - /// - /// - /// The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. - /// - /// - public Elastic.Clients.Elasticsearch.Id? JobId { get; set; } - /// /// /// This advanced configuration option stores model information along with the results. It provides a more detailed view into anomaly detection. If you enable model plot it can add considerable overhead to the performance of the system; it is not feasible for jobs with many entities. Model plot provides a simplified and indicative view of the model and its bounds. It does not display complex features such as multivariate correlations or multimodal data. As such, anomalies may occasionally be reported which cannot be seen in the model plot. Model plot config can be configured when the job is created or updated later. It must be disabled if performance issues are experienced. @@ -271,14 +275,33 @@ public PutJobRequestDescriptor(Elastic.Clients.Elasticsearch.MachineLearning.Put Instance = instance; } + public PutJobRequestDescriptor(Elastic.Clients.Elasticsearch.Id jobId) + { +#pragma warning disable CS0618 + Instance = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest(jobId); +#pragma warning restore CS0618 + } + + [System.Obsolete("The use of the parameterless constructor is not permitted for this type.")] public PutJobRequestDescriptor() { - Instance = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + throw new System.InvalidOperationException("The use of the parameterless constructor is not permitted for this type."); } public static explicit operator Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest instance) => new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest(Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor descriptor) => descriptor.Instance; + /// + /// + /// The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. + /// + /// + public Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Id value) + { + Instance.JobId = value; + return this; + } + /// /// /// If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the @@ -569,17 +592,6 @@ public Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor Gro return this; } - /// - /// - /// The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Id? value) - { - Instance.JobId = value; - return this; - } - /// /// /// This advanced configuration option stores model information along with the results. It provides a more detailed view into anomaly detection. If you enable model plot it can add considerable overhead to the performance of the system; it is not feasible for jobs with many entities. Model plot provides a simplified and indicative view of the model and its bounds. It does not display complex features such as multivariate correlations or multimodal data. As such, anomalies may occasionally be reported which cannot be seen in the model plot. Model plot config can be configured when the job is created or updated later. It must be disabled if performance issues are experienced. @@ -738,14 +750,33 @@ public PutJobRequestDescriptor(Elastic.Clients.Elasticsearch.MachineLearning.Put Instance = instance; } + public PutJobRequestDescriptor(Elastic.Clients.Elasticsearch.Id jobId) + { +#pragma warning disable CS0618 + Instance = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest(jobId); +#pragma warning restore CS0618 + } + + [System.Obsolete("The use of the parameterless constructor is not permitted for this type.")] public PutJobRequestDescriptor() { - Instance = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + throw new System.InvalidOperationException("The use of the parameterless constructor is not permitted for this type."); } public static explicit operator Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest instance) => new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest(Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor descriptor) => descriptor.Instance; + /// + /// + /// The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. + /// + /// + public Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Id value) + { + Instance.JobId = value; + return this; + } + /// /// /// If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the @@ -1003,17 +1034,6 @@ public Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor - /// - /// The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor JobId(Elastic.Clients.Elasticsearch.Id? value) - { - Instance.JobId = value; - return this; - } - /// /// /// This advanced configuration option stores model information along with the results. It provides a more detailed view into anomaly detection. If you enable model plot it can add considerable overhead to the performance of the system; it is not feasible for jobs with many entities. Model plot provides a simplified and indicative view of the model and its bounds. It does not display complex features such as multivariate correlations or multimodal data. As such, anomalies may occasionally be reported which cannot be seen in the model plot. Model plot config can be configured when the job is created or updated later. It must be disabled if performance issues are experienced. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs index 497adefb00e..fb704f7650b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs @@ -51,6 +51,7 @@ public sealed partial class MultiSearchRequestParameters : Elastic.Transport.Req /// If true, concrete, expanded or aliased indices are ignored when frozen. /// /// + [System.Obsolete("Deprecated in '7.16.0'. This parameter is deprecated because frozen indices have been deprecated.")] public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } /// @@ -222,6 +223,7 @@ internal MultiSearchRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// If true, concrete, expanded or aliased indices are ignored when frozen. /// /// + [System.Obsolete("Deprecated in '7.16.0'. This parameter is deprecated because frozen indices have been deprecated.")] public bool? IgnoreThrottled { get => Q("ignore_throttled"); set => Q("ignore_throttled", value); } /// @@ -401,6 +403,7 @@ public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor ExpandWildcard return this; } + [System.Obsolete("Deprecated in '7.16.0'. This parameter is deprecated because frozen indices have been deprecated.")] /// /// /// If true, concrete, expanded or aliased indices are ignored when frozen. @@ -682,6 +685,7 @@ public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor Exp return this; } + [System.Obsolete("Deprecated in '7.16.0'. This parameter is deprecated because frozen indices have been deprecated.")] /// /// /// If true, concrete, expanded or aliased indices are ignored when frozen. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.Converters.g.cs index be806a1cd28..73777a3c8cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.Converters.g.cs @@ -32,7 +32,6 @@ public sealed partial class PutUserRequestConverter : System.Text.Json.Serializa private static readonly System.Text.Json.JsonEncodedText PropPassword = System.Text.Json.JsonEncodedText.Encode("password"); private static readonly System.Text.Json.JsonEncodedText PropPasswordHash = System.Text.Json.JsonEncodedText.Encode("password_hash"); private static readonly System.Text.Json.JsonEncodedText PropRoles = System.Text.Json.JsonEncodedText.Encode("roles"); - private static readonly System.Text.Json.JsonEncodedText PropUsername = System.Text.Json.JsonEncodedText.Encode("username"); public override Elastic.Clients.Elasticsearch.Security.PutUserRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { @@ -44,7 +43,6 @@ public override Elastic.Clients.Elasticsearch.Security.PutUserRequest Read(ref S LocalJsonValue propPassword = default; LocalJsonValue propPasswordHash = default; LocalJsonValue?> propRoles = default; - LocalJsonValue propUsername = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propEmail.TryReadProperty(ref reader, options, PropEmail, null)) @@ -82,11 +80,6 @@ public override Elastic.Clients.Elasticsearch.Security.PutUserRequest Read(ref S continue; } - if (propUsername.TryReadProperty(ref reader, options, PropUsername, null)) - { - continue; - } - if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.SafeSkip(); @@ -105,8 +98,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutUserRequest Read(ref S Metadata = propMetadata.Value, Password = propPassword.Value, PasswordHash = propPasswordHash.Value, - Roles = propRoles.Value, - Username = propUsername.Value + Roles = propRoles.Value }; } @@ -120,7 +112,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropPassword, value.Password, null, null); writer.WriteProperty(options, PropPasswordHash, value.PasswordHash, null, null); writer.WriteProperty(options, PropRoles, value.Roles, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropUsername, value.Username, null, null); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs index c9269ea7d76..19f224e952e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs @@ -47,12 +47,11 @@ public sealed partial class PutUserRequestParameters : Elastic.Transport.Request [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Security.Json.PutUserRequestConverter))] public sealed partial class PutUserRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest { -#if NET7_0_OR_GREATER - public PutUserRequest() + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PutUserRequest(Elastic.Clients.Elasticsearch.Username username) : base(r => r.Required("username", username)) { } -#endif -#if !NET7_0_OR_GREATER +#if NET7_0_OR_GREATER public PutUserRequest() { } @@ -71,6 +70,22 @@ internal PutUserRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc internal override string OperationName => "security.put_user"; + /// + /// + /// An identifier for the user. + /// + /// + /// NOTE: Usernames must be at least 1 and no more than 507 characters. + /// They can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block. + /// Leading or trailing whitespace is not allowed. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Username Username { get => P("username"); set => PR("username", value); } + /// /// /// Valid values are true, false, and wait_for. @@ -136,7 +151,6 @@ internal PutUserRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// public System.Collections.Generic.ICollection? Roles { get; set; } - public Elastic.Clients.Elasticsearch.Username? Username { get; set; } } /// @@ -159,14 +173,36 @@ public PutUserRequestDescriptor(Elastic.Clients.Elasticsearch.Security.PutUserRe Instance = instance; } + public PutUserRequestDescriptor(Elastic.Clients.Elasticsearch.Username username) + { + Instance = new Elastic.Clients.Elasticsearch.Security.PutUserRequest(username); + } + + [System.Obsolete("The use of the parameterless constructor is not permitted for this type.")] public PutUserRequestDescriptor() { - Instance = new Elastic.Clients.Elasticsearch.Security.PutUserRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + throw new System.InvalidOperationException("The use of the parameterless constructor is not permitted for this type."); } public static explicit operator Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(Elastic.Clients.Elasticsearch.Security.PutUserRequest instance) => new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Security.PutUserRequest(Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor descriptor) => descriptor.Instance; + /// + /// + /// An identifier for the user. + /// + /// + /// NOTE: Usernames must be at least 1 and no more than 507 characters. + /// They can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block. + /// Leading or trailing whitespace is not allowed. + /// + /// + public Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor Username(Elastic.Clients.Elasticsearch.Username value) + { + Instance.Username = value; + return this; + } + /// /// /// Valid values are true, false, and wait_for. @@ -307,20 +343,9 @@ public Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor Roles(par return this; } - public Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor Username(Elastic.Clients.Elasticsearch.Username? value) - { - Instance.Username = value; - return this; - } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static Elastic.Clients.Elasticsearch.Security.PutUserRequest Build(System.Action? action) + internal static Elastic.Clients.Elasticsearch.Security.PutUserRequest Build(System.Action action) { - if (action is null) - { - return new Elastic.Clients.Elasticsearch.Security.PutUserRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); - } - var builder = new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(new Elastic.Clients.Elasticsearch.Security.PutUserRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); action.Invoke(builder); return builder.Instance; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs index afa7fd23ac6..e407c852b88 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackInfoRequest.g.cs @@ -30,6 +30,7 @@ public sealed partial class XpackInfoRequestParameters : Elastic.Transport.Reque /// If this param is used it must be set to true /// /// + [System.Obsolete("Deprecated in '8.0.0'. Supported for backwards compatibility with 7.x")] public bool? AcceptEnterprise { get => Q("accept_enterprise"); set => Q("accept_enterprise", value); } /// @@ -96,6 +97,7 @@ internal XpackInfoRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// If this param is used it must be set to true /// /// + [System.Obsolete("Deprecated in '8.0.0'. Supported for backwards compatibility with 7.x")] public bool? AcceptEnterprise { get => Q("accept_enterprise"); set => Q("accept_enterprise", value); } /// @@ -148,6 +150,7 @@ public XpackInfoRequestDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Xpack.XpackInfoRequestDescriptor(Elastic.Clients.Elasticsearch.Xpack.XpackInfoRequest instance) => new Elastic.Clients.Elasticsearch.Xpack.XpackInfoRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Xpack.XpackInfoRequest(Elastic.Clients.Elasticsearch.Xpack.XpackInfoRequestDescriptor descriptor) => descriptor.Instance; + [System.Obsolete("Deprecated in '8.0.0'. Supported for backwards compatibility with 7.x")] /// /// /// If this param is used it must be set to true diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ml.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ml.g.cs index 735f8f28bb8..a934bac80ec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ml.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Ml.g.cs @@ -3166,18 +3166,26 @@ public virtual Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse PutJ return DoRequest(request); } - public virtual Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse PutJob(System.Action action) + public virtual Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id jobId) { - var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(); + var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(jobId); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id jobId, System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(jobId); action.Invoke(builder); var request = builder.Instance; request.BeforeRequest(); return DoRequest(request); } - public virtual Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse PutJob(System.Action> action) + public virtual Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse PutJob(Elastic.Clients.Elasticsearch.Id jobId, System.Action> action) { - var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(); + var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(jobId); action.Invoke(builder); var request = builder.Instance; request.BeforeRequest(); @@ -3190,18 +3198,26 @@ public virtual Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse PutJ return DoRequestAsync(request, cancellationToken); } - public virtual System.Threading.Tasks.Task PutJobAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + public virtual System.Threading.Tasks.Task PutJobAsync(Elastic.Clients.Elasticsearch.Id jobId, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(jobId); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task PutJobAsync(Elastic.Clients.Elasticsearch.Id jobId, System.Action action, System.Threading.CancellationToken cancellationToken = default) { - var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(); + var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(jobId); action.Invoke(builder); var request = builder.Instance; request.BeforeRequest(); return DoRequestAsync(request, cancellationToken); } - public virtual System.Threading.Tasks.Task PutJobAsync(System.Action> action, System.Threading.CancellationToken cancellationToken = default) + public virtual System.Threading.Tasks.Task PutJobAsync(Elastic.Clients.Elasticsearch.Id jobId, System.Action> action, System.Threading.CancellationToken cancellationToken = default) { - var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(); + var builder = new Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequestDescriptor(jobId); action.Invoke(builder); var request = builder.Instance; request.BeforeRequest(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs index 096a324cce7..6688e518ee8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs @@ -2586,17 +2586,17 @@ public virtual Elastic.Clients.Elasticsearch.Security.PutUserResponse PutUser(El return DoRequest(request); } - public virtual Elastic.Clients.Elasticsearch.Security.PutUserResponse PutUser() + public virtual Elastic.Clients.Elasticsearch.Security.PutUserResponse PutUser(Elastic.Clients.Elasticsearch.Username username) { - var builder = new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(); + var builder = new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(username); var request = builder.Instance; request.BeforeRequest(); return DoRequest(request); } - public virtual Elastic.Clients.Elasticsearch.Security.PutUserResponse PutUser(System.Action action) + public virtual Elastic.Clients.Elasticsearch.Security.PutUserResponse PutUser(Elastic.Clients.Elasticsearch.Username username, System.Action action) { - var builder = new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(); + var builder = new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(username); action.Invoke(builder); var request = builder.Instance; request.BeforeRequest(); @@ -2609,17 +2609,17 @@ public virtual Elastic.Clients.Elasticsearch.Security.PutUserResponse PutUser(Sy return DoRequestAsync(request, cancellationToken); } - public virtual System.Threading.Tasks.Task PutUserAsync(System.Threading.CancellationToken cancellationToken = default) + public virtual System.Threading.Tasks.Task PutUserAsync(Elastic.Clients.Elasticsearch.Username username, System.Threading.CancellationToken cancellationToken = default) { - var builder = new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(); + var builder = new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(username); var request = builder.Instance; request.BeforeRequest(); return DoRequestAsync(request, cancellationToken); } - public virtual System.Threading.Tasks.Task PutUserAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + public virtual System.Threading.Tasks.Task PutUserAsync(Elastic.Clients.Elasticsearch.Username username, System.Action action, System.Threading.CancellationToken cancellationToken = default) { - var builder = new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(); + var builder = new Elastic.Clients.Elasticsearch.Security.PutUserRequestDescriptor(username); action.Invoke(builder); var request = builder.Instance; request.BeforeRequest();