From ea751dce4681c0725565b0faa9c5699e656dd109 Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Wed, 24 Sep 2025 11:32:26 +0000 Subject: [PATCH] Regenerate client --- .../_Generated/Api/ApiUrlLookup.g.cs | 3 + .../Esql/AsyncQueryRequest.Converters.g.cs | 3 +- .../Api/Esql/AsyncQueryRequest.g.cs | 6 +- .../Api/Esql/EsqlQueryRequest.Converters.g.cs | 3 +- .../_Generated/Api/Esql/EsqlQueryRequest.g.cs | 6 +- .../CreateFromRequest.Converters.g.cs | 2 +- .../IndexManagement/CreateFromRequest.g.cs | 21 +- .../Api/IndexManagement/DiskUsageRequest.g.cs | 9 + .../Api/IndexManagement/RefreshRequest.g.cs | 9 + ...mulateIndexTemplateRequest.Converters.g.cs | 20 +- .../SimulateIndexTemplateRequest.g.cs | 169 +++++++++++++- .../TextEmbeddingRequest.Converters.g.cs | 9 + .../Api/Inference/TextEmbeddingRequest.g.cs | 74 ++++++ .../Ingest/PutPipelineRequest.Converters.g.cs | 9 + .../Api/Ingest/PutPipelineRequest.g.cs | 29 +++ .../LicenseManagement/GetLicenseRequest.g.cs | 12 +- .../GetOverallBucketsRequest.Converters.g.cs | 6 +- .../GetOverallBucketsRequest.g.cs | 4 +- .../UpdateDatafeedResponse.g.cs | 26 ++- .../Api/Nodes/NodesStatsRequest.g.cs | 8 +- .../LogsDisableRequest.Converters.g.cs | 53 +++++ .../Api/Streams/LogsDisableRequest.g.cs | 201 +++++++++++++++++ .../LogsDisableResponse.Converters.g.cs | 63 ++++++ .../Api/Streams/LogsDisableResponse.g.cs | 50 +++++ .../Streams/LogsEnableRequest.Converters.g.cs | 53 +++++ .../Api/Streams/LogsEnableRequest.g.cs | 211 ++++++++++++++++++ .../LogsEnableResponse.Converters.g.cs | 63 ++++++ .../Api/Streams/LogsEnableResponse.g.cs | 50 +++++ .../StreamsStatusRequest.Converters.g.cs | 53 +++++ .../Api/Streams/StreamsStatusRequest.g.cs | 170 ++++++++++++++ .../StreamsStatusResponse.Converters.g.cs | 63 ++++++ .../Api/Streams/StreamsStatusResponse.g.cs | 45 ++++ .../Client/ElasticsearchClient.Indices.g.cs | 18 ++ .../Client/ElasticsearchClient.Streams.g.cs | 178 +++++++++++++++ .../Client/ElasticsearchClient.g.cs | 2 + .../MSearch/MultisearchHeader.Converters.g.cs | 9 + .../Types/Core/MSearch/MultisearchHeader.g.cs | 7 + .../Types/Core/Search/Rescore.Converters.g.cs | 12 + .../_Generated/Types/Core/Search/Rescore.g.cs | 26 +++ .../Core/Search/ScriptRescore.Converters.g.cs | 63 ++++++ .../Types/Core/Search/ScriptRescore.g.cs | 102 +++++++++ .../Ingest/AppendProcessor.Converters.g.cs | 15 +- .../Types/Ingest/AppendProcessor.g.cs | 74 ++++-- .../Ingest/FieldAccessPattern.Converters.g.cs | 81 +++++++ .../Types/Ingest/FieldAccessPattern.g.cs | 33 +++ .../Types/Ingest/Pipeline.Converters.g.cs | 9 + .../_Generated/Types/Ingest/Pipeline.g.cs | 29 +++ .../Types/MachineLearning/Datafeed.g.cs | 6 + .../Types/NodeStatsLevel.Converters.g.cs | 95 ++++++++ .../_Generated/Types/NodeStatsLevel.g.cs | 35 +++ .../Security/ApiKeyManagedBy.Converters.g.cs | 81 +++++++ .../Types/Security/ApiKeyManagedBy.g.cs | 33 +++ .../AuthenticateApiKey.Converters.g.cs | 18 ++ .../Types/Security/AuthenticateApiKey.g.cs | 14 +- .../Types/Streams/LogsStatus.Converters.g.cs | 63 ++++++ .../_Generated/Types/Streams/LogsStatus.g.cs | 61 +++++ 56 files changed, 2481 insertions(+), 86 deletions(-) create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableRequest.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableResponse.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableRequest.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableResponse.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusRequest.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusRequest.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusResponse.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusResponse.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Streams.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ScriptRescore.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ScriptRescore.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FieldAccessPattern.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FieldAccessPattern.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeStatsLevel.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeStatsLevel.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyManagedBy.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyManagedBy.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Streams/LogsStatus.Converters.g.cs create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Streams/LogsStatus.g.cs diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs index 3eb0683d552..ff81d33cf89 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs @@ -449,6 +449,9 @@ internal static class ApiUrlLookup internal static ApiUrls SqlGetAsyncStatus = new ApiUrls(new[] { "_sql/async/status/{id}" }); internal static ApiUrls SqlQuery = new ApiUrls(new[] { "_sql" }); internal static ApiUrls SqlTranslate = new ApiUrls(new[] { "_sql/translate" }); + internal static ApiUrls StreamsLogsDisable = new ApiUrls(new[] { "_streams/logs/_disable" }); + internal static ApiUrls StreamsLogsEnable = new ApiUrls(new[] { "_streams/logs/_enable" }); + internal static ApiUrls StreamsStatus = new ApiUrls(new[] { "_streams/status" }); internal static ApiUrls SynonymsDeleteSynonym = new ApiUrls(new[] { "_synonyms/{id}" }); internal static ApiUrls SynonymsDeleteSynonymRule = new ApiUrls(new[] { "_synonyms/{set_id}/{rule_id}" }); internal static ApiUrls SynonymsGetSynonym = new ApiUrls(new[] { "_synonyms/{id}" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.Converters.g.cs index 121c4b5c27b..f4e70789097 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.Converters.g.cs @@ -28,6 +28,7 @@ public sealed partial class AsyncQueryRequestConverter : System.Text.Json.Serial private static readonly System.Text.Json.JsonEncodedText PropColumnar = System.Text.Json.JsonEncodedText.Encode("columnar"); private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata = System.Text.Json.JsonEncodedText.Encode("include_ccs_metadata"); + private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata1 = System.Text.Json.JsonEncodedText.Encode("include_execution_metadata"); private static readonly System.Text.Json.JsonEncodedText PropKeepAlive = System.Text.Json.JsonEncodedText.Encode("keep_alive"); private static readonly System.Text.Json.JsonEncodedText PropKeepOnCompletion = System.Text.Json.JsonEncodedText.Encode("keep_on_completion"); private static readonly System.Text.Json.JsonEncodedText PropLocale = System.Text.Json.JsonEncodedText.Encode("locale"); @@ -61,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy continue; } - if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata1, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs index 726d8f66e60..8b71fb92b2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs @@ -166,7 +166,7 @@ internal AsyncQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// When set to true and performing a cross-cluster/cross-project query, the response will include an extra _clusters /// object with information about the clusters that participated in the search along with info such as shards /// count. /// @@ -361,7 +361,7 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter( /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// When set to true and performing a cross-cluster/cross-project query, the response will include an extra _clusters /// object with information about the clusters that participated in the search along with info such as shards /// count. /// @@ -635,7 +635,7 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// When set to true and performing a cross-cluster/cross-project query, the response will include an extra _clusters /// object with information about the clusters that participated in the search along with info such as shards /// count. /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.Converters.g.cs index 8f3356eb856..253d60167f1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.Converters.g.cs @@ -28,6 +28,7 @@ public sealed partial class EsqlQueryRequestConverter : System.Text.Json.Seriali private static readonly System.Text.Json.JsonEncodedText PropColumnar = System.Text.Json.JsonEncodedText.Encode("columnar"); private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata = System.Text.Json.JsonEncodedText.Encode("include_ccs_metadata"); + private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata1 = System.Text.Json.JsonEncodedText.Encode("include_execution_metadata"); private static readonly System.Text.Json.JsonEncodedText PropLocale = System.Text.Json.JsonEncodedText.Encode("locale"); private static readonly System.Text.Json.JsonEncodedText PropParams = System.Text.Json.JsonEncodedText.Encode("params"); private static readonly System.Text.Json.JsonEncodedText PropProfile = System.Text.Json.JsonEncodedText.Encode("profile"); @@ -55,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys continue; } - if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata1, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs index ba5452d1f27..35f57b85c95 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs @@ -153,7 +153,7 @@ internal EsqlQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// When set to true and performing a cross-cluster/cross-project query, the response will include an extra _clusters /// object with information about the clusters that participated in the search along with info such as shards /// count. /// @@ -312,7 +312,7 @@ public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor Filter(S /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// When set to true and performing a cross-cluster/cross-project query, the response will include an extra _clusters /// object with information about the clusters that participated in the search along with info such as shards /// count. /// @@ -538,7 +538,7 @@ public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// When set to true and performing a cross-cluster/cross-project query, the response will include an extra _clusters /// object with information about the clusters that participated in the search along with info such as shards /// count. /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateFromRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateFromRequest.Converters.g.cs index 169b8709ffb..9dbd7036f84 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateFromRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateFromRequest.Converters.g.cs @@ -27,7 +27,7 @@ public sealed partial class CreateFromRequestConverter : System.Text.Json.Serial { public override Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { CreateFrom = reader.ReadValue(options, null) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { CreateFrom = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest value, System.Text.Json.JsonSerializerOptions options) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateFromRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateFromRequest.g.cs index e0022f1ee2c..d341b545db7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateFromRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateFromRequest.g.cs @@ -38,17 +38,10 @@ public sealed partial class CreateFromRequestParameters : Elastic.Transport.Requ [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Json.CreateFromRequestConverter))] public sealed partial class CreateFromRequest : 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 CreateFromRequest(Elastic.Clients.Elasticsearch.IndexName source, Elastic.Clients.Elasticsearch.IndexName dest) : base(r => r.Required("source", source).Required("dest", dest)) { } - - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public CreateFromRequest(Elastic.Clients.Elasticsearch.IndexName source, Elastic.Clients.Elasticsearch.IndexName dest, Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom createFrom) : base(r => r.Required("source", source).Required("dest", dest)) - { - CreateFrom = createFrom; - } #if NET7_0_OR_GREATER public CreateFromRequest() { @@ -89,11 +82,7 @@ internal CreateFromRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst required #endif Elastic.Clients.Elasticsearch.IndexName Source { get => P("source"); set => PR("source", value); } - public -#if NET7_0_OR_GREATER - required -#endif - Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom CreateFrom { get; set; } + public Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom? CreateFrom { get; set; } } /// @@ -116,9 +105,7 @@ public CreateFromRequestDescriptor(Elastic.Clients.Elasticsearch.IndexManagement public CreateFromRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName source, Elastic.Clients.Elasticsearch.IndexName dest) { -#pragma warning disable CS0618 Instance = new Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest(source, dest); -#pragma warning restore CS0618 } [System.Obsolete("The use of the parameterless constructor is not permitted for this type.")] @@ -152,7 +139,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor return this; } - public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor CreateFrom(Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom value) + public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor CreateFrom(Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom? value) { Instance.CreateFrom = value; return this; @@ -247,9 +234,7 @@ public CreateFromRequestDescriptor(Elastic.Clients.Elasticsearch.IndexManagement public CreateFromRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName source, Elastic.Clients.Elasticsearch.IndexName dest) { -#pragma warning disable CS0618 Instance = new Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequest(source, dest); -#pragma warning restore CS0618 } [System.Obsolete("The use of the parameterless constructor is not permitted for this type.")] @@ -283,7 +268,7 @@ public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor return this; } - public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor CreateFrom(Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom value) + public Elastic.Clients.Elasticsearch.IndexManagement.CreateFromRequestDescriptor CreateFrom(Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom? value) { Instance.CreateFrom = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageRequest.g.cs index 11b53047e29..f07d836f6cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageRequest.g.cs @@ -79,6 +79,9 @@ public sealed partial class DiskUsageRequestParameters : Elastic.Transport.Reque /// Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate. /// The stored size of the _id field is likely underestimated while the _source field is overestimated. /// +/// +/// For usage examples see the External documentation or refer to Analyze the index disk usage example for an example. +/// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.Json.DiskUsageRequestConverter))] public sealed partial class DiskUsageRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest @@ -172,6 +175,9 @@ internal DiskUsageRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate. /// The stored size of the _id field is likely underestimated while the _source field is overestimated. /// +/// +/// For usage examples see the External documentation or refer to Analyze the index disk usage example for an example. +/// /// public readonly partial struct DiskUsageRequestDescriptor { @@ -346,6 +352,9 @@ public Elastic.Clients.Elasticsearch.IndexManagement.DiskUsageRequestDescriptor /// Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate. /// The stored size of the _id field is likely underestimated while the _source field is overestimated. /// +/// +/// For usage examples see the External documentation or refer to Analyze the index disk usage example for an example. +/// /// public readonly partial struct DiskUsageRequestDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs index e049f041ee5..2bc8e5caba2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshRequest.g.cs @@ -61,6 +61,9 @@ public sealed partial class RefreshRequestParameters : Elastic.Transport.Request /// You can change this default interval with the index.refresh_interval setting. /// /// +/// In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices. +/// +/// /// Refresh requests are synchronous and do not return a response until the refresh operation completes. /// /// @@ -147,6 +150,9 @@ internal RefreshRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// You can change this default interval with the index.refresh_interval setting. /// /// +/// In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices. +/// +/// /// Refresh requests are synchronous and do not return a response until the refresh operation completes. /// /// @@ -310,6 +316,9 @@ public Elastic.Clients.Elasticsearch.IndexManagement.RefreshRequestDescriptor Re /// You can change this default interval with the index.refresh_interval setting. /// /// +/// In Elastic Cloud Serverless, the default refresh interval is 5 seconds across all indices. +/// +/// /// Refresh requests are synchronous and do not return a response until the refresh operation completes. /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.Converters.g.cs index 8849c06e93a..20ee61d3563 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.Converters.g.cs @@ -27,27 +27,11 @@ public sealed partial class SimulateIndexTemplateRequestConverter : System.Text. { public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) - { - if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) - { - reader.Skip(); - continue; - } - - throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); - } - - reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); - return new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) - { - }; + return new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { IndexTemplate = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteStartObject(); - writer.WriteEndObject(); + writer.WriteValue(options, value.IndexTemplate, null); } } \ No newline at end of file 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 b3429fa9f70..1b92d2c41de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateIndexTemplateRequest.g.cs @@ -82,7 +82,7 @@ internal SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serializatio protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "indices.simulate_index_template"; @@ -124,6 +124,7 @@ internal SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serializatio /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + public Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate? IndexTemplate { get; set; } } /// @@ -211,6 +212,24 @@ public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateReques return this; } + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor IndexTemplate(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate? value) + { + Instance.IndexTemplate = value; + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor IndexTemplate(System.Action action) + { + Instance.IndexTemplate = Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor IndexTemplate(System.Action> action) + { + Instance.IndexTemplate = Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDescriptor.Build(action); + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest Build(System.Action action) { @@ -260,4 +279,152 @@ public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateReques Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; return this; } +} + +/// +/// +/// Simulate an index. +/// Get the index configuration that would be applied to the specified index from an existing index template. +/// +/// +public readonly partial struct SimulateIndexTemplateRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SimulateIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest instance) + { + Instance = instance; + } + + public SimulateIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) + { + Instance = new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest(name); + } + + [System.Obsolete("The use of the parameterless constructor is not permitted for this type.")] + public SimulateIndexTemplateRequestDescriptor() + { + throw new System.InvalidOperationException("The use of the parameterless constructor is not permitted for this type."); + } + + public static explicit operator Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest instance) => new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Name of the index to simulate + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name value) + { + Instance.Name = value; + return this; + } + + /// + /// + /// User defined reason for dry-run creating the new template for simulation purposes + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor Cause(string? value) + { + Instance.Cause = value; + return this; + } + + /// + /// + /// Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor Create(bool? value = true) + { + Instance.Create = value; + return this; + } + + /// + /// + /// If true, returns all relevant default configurations for the index template. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor IncludeDefaults(bool? value = true) + { + Instance.IncludeDefaults = value; + return this; + } + + /// + /// + /// 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.IndexManagement.SimulateIndexTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.MasterTimeout = value; + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor IndexTemplate(Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate? value) + { + Instance.IndexTemplate = value; + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor IndexTemplate(System.Action> action) + { + Instance.IndexTemplate = Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor(new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingRequest.Converters.g.cs index 32d3373803c..56ed501c9a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingRequest.Converters.g.cs @@ -26,12 +26,14 @@ namespace Elastic.Clients.Elasticsearch.Inference.Json; public sealed partial class TextEmbeddingRequestConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropInput = System.Text.Json.JsonEncodedText.Encode("input"); + private static readonly System.Text.Json.JsonEncodedText PropInputType = System.Text.Json.JsonEncodedText.Encode("input_type"); private static readonly System.Text.Json.JsonEncodedText PropTaskSettings = System.Text.Json.JsonEncodedText.Encode("task_settings"); public override Elastic.Clients.Elasticsearch.Inference.TextEmbeddingRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue> propInput = default; + LocalJsonValue propInputType = default; LocalJsonValue propTaskSettings = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -40,6 +42,11 @@ public override Elastic.Clients.Elasticsearch.Inference.TextEmbeddingRequest Rea continue; } + if (propInputType.TryReadProperty(ref reader, options, PropInputType, null)) + { + continue; + } + if (propTaskSettings.TryReadProperty(ref reader, options, PropTaskSettings, static object? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker)))) { continue; @@ -58,6 +65,7 @@ public override Elastic.Clients.Elasticsearch.Inference.TextEmbeddingRequest Rea return new Elastic.Clients.Elasticsearch.Inference.TextEmbeddingRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Input = propInput.Value, + InputType = propInputType.Value, TaskSettings = propTaskSettings.Value }; } @@ -66,6 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropInput, value.Input, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropInputType, value.InputType, null, null); writer.WriteProperty(options, PropTaskSettings, value.TaskSettings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingRequest.g.cs index 355b2df3754..7ed2cb2fc8f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingRequest.g.cs @@ -101,6 +101,41 @@ internal TextEmbeddingRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo #endif System.Collections.Generic.ICollection Input { get; set; } + /// + /// + /// The input data type for the text embedding model. Possible values include: + /// + /// + /// + /// + /// SEARCH + /// + /// + /// + /// + /// INGEST + /// + /// + /// + /// + /// CLASSIFICATION + /// + /// + /// + /// + /// CLUSTERING + /// Not all services support all values. Unsupported values will trigger a validation exception. + /// Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info. + /// + /// + /// + /// + /// info + /// The input_type parameter specified on the root level of the request body will take precedence over the input_type parameter specified in task_settings. + /// + /// + public string? InputType { get; set; } + /// /// /// Optional task settings @@ -186,6 +221,45 @@ public Elastic.Clients.Elasticsearch.Inference.TextEmbeddingRequestDescriptor In return this; } + /// + /// + /// The input data type for the text embedding model. Possible values include: + /// + /// + /// + /// + /// SEARCH + /// + /// + /// + /// + /// INGEST + /// + /// + /// + /// + /// CLASSIFICATION + /// + /// + /// + /// + /// CLUSTERING + /// Not all services support all values. Unsupported values will trigger a validation exception. + /// Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info. + /// + /// + /// + /// + /// info + /// The input_type parameter specified on the root level of the request body will take precedence over the input_type parameter specified in task_settings. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.TextEmbeddingRequestDescriptor InputType(string? value) + { + Instance.InputType = value; + return this; + } + /// /// /// Optional task settings diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.Converters.g.cs index 99a5d3cc65e..d9f7928525a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.Converters.g.cs @@ -27,6 +27,7 @@ public sealed partial class PutPipelineRequestConverter : System.Text.Json.Seria { private static readonly System.Text.Json.JsonEncodedText PropDeprecated = System.Text.Json.JsonEncodedText.Encode("deprecated"); private static readonly System.Text.Json.JsonEncodedText PropDescription = System.Text.Json.JsonEncodedText.Encode("description"); + private static readonly System.Text.Json.JsonEncodedText PropFieldAccessPattern = System.Text.Json.JsonEncodedText.Encode("field_access_pattern"); private static readonly System.Text.Json.JsonEncodedText PropMeta = System.Text.Json.JsonEncodedText.Encode("_meta"); private static readonly System.Text.Json.JsonEncodedText PropOnFailure = System.Text.Json.JsonEncodedText.Encode("on_failure"); private static readonly System.Text.Json.JsonEncodedText PropProcessors = System.Text.Json.JsonEncodedText.Encode("processors"); @@ -37,6 +38,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDeprecated = default; LocalJsonValue propDescription = default; + LocalJsonValue propFieldAccessPattern = default; LocalJsonValue?> propMeta = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue?> propProcessors = default; @@ -53,6 +55,11 @@ public override Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest Read(ref continue; } + if (propFieldAccessPattern.TryReadProperty(ref reader, options, PropFieldAccessPattern, static Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (propMeta.TryReadProperty(ref reader, options, PropMeta, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!))) { continue; @@ -87,6 +94,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest Read(ref { Deprecated = propDeprecated.Value, Description = propDescription.Value, + FieldAccessPattern = propFieldAccessPattern.Value, Meta = propMeta.Value, OnFailure = propOnFailure.Value, Processors = propProcessors.Value, @@ -99,6 +107,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); + writer.WriteProperty(options, PropFieldAccessPattern, value.FieldAccessPattern, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker)))); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropProcessors, value.Processors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs index 56129cd6b38..cc65dfd2f28 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs @@ -126,6 +126,13 @@ internal PutPipelineRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// public string? Description { get; set; } + /// + /// + /// Controls how processors in this pipeline should read and write data on a document's source. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? FieldAccessPattern { get; set; } + /// /// /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. @@ -252,6 +259,17 @@ public Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequestDescriptor Descrip return this; } + /// + /// + /// Controls how processors in this pipeline should read and write data on a document's source. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequestDescriptor FieldAccessPattern(Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? value) + { + Instance.FieldAccessPattern = value; + return this; + } + /// /// /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. @@ -563,6 +581,17 @@ public Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequestDescriptor + /// + /// Controls how processors in this pipeline should read and write data on a document's source. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequestDescriptor FieldAccessPattern(Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? value) + { + Instance.FieldAccessPattern = value; + return this; + } + /// /// /// Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/GetLicenseRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/GetLicenseRequest.g.cs index fdc7399b709..c3e8c744ff0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/GetLicenseRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/GetLicenseRequest.g.cs @@ -36,7 +36,9 @@ public sealed partial class GetLicenseRequestParameters : Elastic.Transport.Requ /// /// - /// Specifies whether to retrieve local information. The default value is false, which means the information is retrieved from the master node. + /// Specifies whether to retrieve local information. + /// From 9.2 onwards the default value is true, which means the information is retrieved from the responding node. + /// In earlier versions the default is false, which means the information is retrieved from the elected master node. /// /// public bool? Local { get => Q("local"); set => Q("local", value); } @@ -93,7 +95,9 @@ internal GetLicenseRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// Specifies whether to retrieve local information. The default value is false, which means the information is retrieved from the master node. + /// Specifies whether to retrieve local information. + /// From 9.2 onwards the default value is true, which means the information is retrieved from the responding node. + /// In earlier versions the default is false, which means the information is retrieved from the elected master node. /// /// public bool? Local { get => Q("local"); set => Q("local", value); } @@ -145,7 +149,9 @@ public Elastic.Clients.Elasticsearch.LicenseManagement.GetLicenseRequestDescript /// /// - /// Specifies whether to retrieve local information. The default value is false, which means the information is retrieved from the master node. + /// Specifies whether to retrieve local information. + /// From 9.2 onwards the default value is true, which means the information is retrieved from the responding node. + /// In earlier versions the default is false, which means the information is retrieved from the elected master node. /// /// public Elastic.Clients.Elasticsearch.LicenseManagement.GetLicenseRequestDescriptor Local(bool? value = true) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.Converters.g.cs index b82d3c802f0..93f14135855 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.Converters.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR LocalJsonValue propBucketSpan = default; LocalJsonValue propEnd = default; LocalJsonValue propExcludeInterim = default; - LocalJsonValue?> propOverallScore = default; + LocalJsonValue propOverallScore = default; LocalJsonValue propStart = default; LocalJsonValue propTopN = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR continue; } - if (propOverallScore.TryReadProperty(ref reader, options, PropOverallScore, static Elastic.Clients.Elasticsearch.Union? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadUnionValue(o, static (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => JsonUnionSelector.ByTokenType(ref r, o, Elastic.Clients.Elasticsearch.Serialization.JsonTokenTypes.Number, Elastic.Clients.Elasticsearch.Serialization.JsonTokenTypes.String), null, null))) + if (propOverallScore.TryReadProperty(ref reader, options, PropOverallScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,7 +109,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBucketSpan, value.BucketSpan, null, null); writer.WriteProperty(options, PropEnd, value.End, 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, PropExcludeInterim, value.ExcludeInterim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); - writer.WriteProperty(options, PropOverallScore, value.OverallScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); + writer.WriteProperty(options, PropOverallScore, value.OverallScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStart, value.Start, 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, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs index e9c3f4adee4..cd7b172bfda 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs @@ -128,7 +128,7 @@ internal GetOverallBucketsRequest(Elastic.Clients.Elasticsearch.Serialization.Js /// Refer to the description for the overall_score query parameter. /// /// - public Elastic.Clients.Elasticsearch.Union? OverallScore { get; set; } + public double? OverallScore { get; set; } /// /// @@ -260,7 +260,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsRequestDes /// Refer to the description for the overall_score query parameter. /// /// - public Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsRequestDescriptor OverallScore(Elastic.Clients.Elasticsearch.Union? value) + public Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsRequestDescriptor OverallScore(double? value) { Instance.OverallScore = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs index af1eab3bb65..10bd818d7ec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs @@ -50,34 +50,40 @@ internal UpdateDatafeedResponse(Elastic.Clients.Elasticsearch.Serialization.Json #endif string DatafeedId { get; set; } public Elastic.Clients.Elasticsearch.MachineLearning.DelayedDataCheckConfig? DelayedDataCheckConfig { get; set; } + + /// + /// + /// The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. For example: 150s. When frequency is shorter than the bucket span, interim results for the last (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value must be divisible by the interval of the date histogram aggregation. + /// + /// public Elastic.Clients.Elasticsearch.Duration? Frequency { get; set; } public #if NET7_0_OR_GREATER -required + required #endif -System.Collections.Generic.IReadOnlyCollection Indices { get; set; } + System.Collections.Generic.IReadOnlyCollection Indices { get; set; } public Elastic.Clients.Elasticsearch.IndicesOptions? IndicesOptions { get; set; } public #if NET7_0_OR_GREATER -required + required #endif -string JobId { get; set; } + string JobId { get; set; } public int? MaxEmptySearches { get; set; } public #if NET7_0_OR_GREATER -required + required #endif -Elastic.Clients.Elasticsearch.QueryDsl.Query Query { get; set; } + Elastic.Clients.Elasticsearch.QueryDsl.Query Query { get; set; } public #if NET7_0_OR_GREATER -required + required #endif -Elastic.Clients.Elasticsearch.Duration QueryDelay { get; set; } + Elastic.Clients.Elasticsearch.Duration QueryDelay { get; set; } public System.Collections.Generic.IReadOnlyDictionary? RuntimeMappings { get; set; } public System.Collections.Generic.IReadOnlyDictionary? ScriptFields { get; set; } public #if NET7_0_OR_GREATER -required + required #endif -int ScrollSize { get; set; } + int ScrollSize { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/NodesStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/NodesStatsRequest.g.cs index aed238b6e10..7938e5270e3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/NodesStatsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/NodesStatsRequest.g.cs @@ -72,7 +72,7 @@ public sealed partial class NodesStatsRequestParameters : Elastic.Transport.Requ /// Indicates whether statistics are aggregated at the cluster, index, or shard level. /// /// - public Elastic.Clients.Elasticsearch.Level? Level { get => Q("level"); set => Q("level", value); } + public Elastic.Clients.Elasticsearch.NodeStatsLevel? Level { get => Q("level"); set => Q("level", value); } /// /// @@ -210,7 +210,7 @@ internal NodesStatsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// Indicates whether statistics are aggregated at the cluster, index, or shard level. /// /// - public Elastic.Clients.Elasticsearch.Level? Level { get => Q("level"); set => Q("level", value); } + public Elastic.Clients.Elasticsearch.NodeStatsLevel? Level { get => Q("level"); set => Q("level", value); } /// /// @@ -414,7 +414,7 @@ public Elastic.Clients.Elasticsearch.Nodes.NodesStatsRequestDescriptor IncludeUn /// Indicates whether statistics are aggregated at the cluster, index, or shard level. /// /// - public Elastic.Clients.Elasticsearch.Nodes.NodesStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.Level? value) + public Elastic.Clients.Elasticsearch.Nodes.NodesStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.NodeStatsLevel? value) { Instance.Level = value; return this; @@ -696,7 +696,7 @@ public Elastic.Clients.Elasticsearch.Nodes.NodesStatsRequestDescriptor /// - public Elastic.Clients.Elasticsearch.Nodes.NodesStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.Level? value) + public Elastic.Clients.Elasticsearch.Nodes.NodesStatsRequestDescriptor Level(Elastic.Clients.Elasticsearch.NodeStatsLevel? value) { Instance.Level = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableRequest.Converters.g.cs new file mode 100644 index 00000000000..1fc5ed3c631 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableRequest.Converters.g.cs @@ -0,0 +1,53 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams.Json; + +public sealed partial class LogsDisableRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableRequest.g.cs new file mode 100644 index 00000000000..f2807d61608 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableRequest.g.cs @@ -0,0 +1,201 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams; + +public sealed partial class LogsDisableRequestParameters : Elastic.Transport.RequestParameters +{ + /// + /// + /// The 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); } + + /// + /// + /// The 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); } +} + +/// +/// +/// Disable logs stream. +/// +/// +/// Turn off the logs stream feature for this cluster. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Streams.Json.LogsDisableRequestConverter))] +public sealed partial class LogsDisableRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ +#if NET7_0_OR_GREATER + public LogsDisableRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + public LogsDisableRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal LogsDisableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.StreamsLogsDisable; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => false; + + internal override string OperationName => "streams.logs_disable"; + + /// + /// + /// The 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); } + + /// + /// + /// The 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); } +} + +/// +/// +/// Disable logs stream. +/// +/// +/// Turn off the logs stream feature for this cluster. +/// +/// +public readonly partial struct LogsDisableRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LogsDisableRequestDescriptor(Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest instance) + { + Instance = instance; + } + + public LogsDisableRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor(Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest instance) => new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest(Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// The 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.Streams.LogsDisableRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.MasterTimeout = value; + return this; + } + + /// + /// + /// The 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.Streams.LogsDisableRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor(new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableResponse.Converters.g.cs new file mode 100644 index 00000000000..5148912b101 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableResponse.Converters.g.cs @@ -0,0 +1,63 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams.Json; + +public sealed partial class LogsDisableResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged"); + + public override Elastic.Clients.Elasticsearch.Streams.LogsDisableResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propAcknowledged = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Streams.LogsDisableResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Acknowledged = propAcknowledged.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Streams.LogsDisableResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableResponse.g.cs new file mode 100644 index 00000000000..8ba3ecbff49 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsDisableResponse.g.cs @@ -0,0 +1,50 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Streams.Json.LogsDisableResponseConverter))] +public sealed partial class LogsDisableResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LogsDisableResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal LogsDisableResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// For a successful response, this value is always true. On failure, an exception is returned instead. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + bool Acknowledged { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableRequest.Converters.g.cs new file mode 100644 index 00000000000..0cf94e5e90c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableRequest.Converters.g.cs @@ -0,0 +1,53 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams.Json; + +public sealed partial class LogsEnableRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableRequest.g.cs new file mode 100644 index 00000000000..12aaac5dd37 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableRequest.g.cs @@ -0,0 +1,211 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams; + +public sealed partial class LogsEnableRequestParameters : Elastic.Transport.RequestParameters +{ + /// + /// + /// The 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); } + + /// + /// + /// The 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); } +} + +/// +/// +/// Enable logs stream. +/// +/// +/// Turn on the logs stream feature for this cluster. +/// +/// +/// NOTE: To protect existing data, this feature can be turned on only if the +/// cluster does not have existing indices or data streams that match the pattern logs|logs.*. +/// If those indices or data streams exist, a 409 - Conflict response and error is returned. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Streams.Json.LogsEnableRequestConverter))] +public sealed partial class LogsEnableRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ +#if NET7_0_OR_GREATER + public LogsEnableRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + public LogsEnableRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal LogsEnableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.StreamsLogsEnable; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => false; + + internal override string OperationName => "streams.logs_enable"; + + /// + /// + /// The 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); } + + /// + /// + /// The 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); } +} + +/// +/// +/// Enable logs stream. +/// +/// +/// Turn on the logs stream feature for this cluster. +/// +/// +/// NOTE: To protect existing data, this feature can be turned on only if the +/// cluster does not have existing indices or data streams that match the pattern logs|logs.*. +/// If those indices or data streams exist, a 409 - Conflict response and error is returned. +/// +/// +public readonly partial struct LogsEnableRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LogsEnableRequestDescriptor(Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest instance) + { + Instance = instance; + } + + public LogsEnableRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor(Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest instance) => new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest(Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// The 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.Streams.LogsEnableRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.MasterTimeout = value; + return this; + } + + /// + /// + /// The 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.Streams.LogsEnableRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor(new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableResponse.Converters.g.cs new file mode 100644 index 00000000000..7ac3b348b0a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableResponse.Converters.g.cs @@ -0,0 +1,63 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams.Json; + +public sealed partial class LogsEnableResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged"); + + public override Elastic.Clients.Elasticsearch.Streams.LogsEnableResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propAcknowledged = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Streams.LogsEnableResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Acknowledged = propAcknowledged.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Streams.LogsEnableResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableResponse.g.cs new file mode 100644 index 00000000000..1a9d9bfb0dc --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/LogsEnableResponse.g.cs @@ -0,0 +1,50 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Streams.Json.LogsEnableResponseConverter))] +public sealed partial class LogsEnableResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LogsEnableResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal LogsEnableResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// For a successful response, this value is always true. On failure, an exception is returned instead. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + bool Acknowledged { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusRequest.Converters.g.cs new file mode 100644 index 00000000000..c5d0e0373d0 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusRequest.Converters.g.cs @@ -0,0 +1,53 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams.Json; + +public sealed partial class StreamsStatusRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusRequest.g.cs new file mode 100644 index 00000000000..04826b15969 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusRequest.g.cs @@ -0,0 +1,170 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams; + +public sealed partial class StreamsStatusRequestParameters : Elastic.Transport.RequestParameters +{ + /// + /// + /// 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.TimeUnit? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } +} + +/// +/// +/// Get the status of streams. +/// +/// +/// Get the current status for all types of streams. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Streams.Json.StreamsStatusRequestConverter))] +public sealed partial class StreamsStatusRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ +#if NET7_0_OR_GREATER + public StreamsStatusRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + public StreamsStatusRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal StreamsStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.StreamsStatus; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "streams.status"; + + /// + /// + /// 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.TimeUnit? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } +} + +/// +/// +/// Get the status of streams. +/// +/// +/// Get the current status for all types of streams. +/// +/// +public readonly partial struct StreamsStatusRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public StreamsStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest instance) + { + Instance = instance; + } + + public StreamsStatusRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest instance) => new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest(Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// 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.Streams.StreamsStatusRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.TimeUnit? value) + { + Instance.MasterTimeout = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor(new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor RequestConfiguration(System.Func? configurationSelector) + { + Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; + return this; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusResponse.Converters.g.cs new file mode 100644 index 00000000000..02160ea4f26 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusResponse.Converters.g.cs @@ -0,0 +1,63 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams.Json; + +public sealed partial class StreamsStatusResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropLogs = System.Text.Json.JsonEncodedText.Encode("logs"); + + public override Elastic.Clients.Elasticsearch.Streams.StreamsStatusResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propLogs = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propLogs.TryReadProperty(ref reader, options, PropLogs, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Streams.StreamsStatusResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Logs = propLogs.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Streams.StreamsStatusResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropLogs, value.Logs, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusResponse.g.cs new file mode 100644 index 00000000000..2b67b731972 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Streams/StreamsStatusResponse.g.cs @@ -0,0 +1,45 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Streams.Json.StreamsStatusResponseConverter))] +public sealed partial class StreamsStatusResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public StreamsStatusResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal StreamsStatusResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +Elastic.Clients.Elasticsearch.Streams.LogsStatus Logs { get; set; } +} \ No newline at end of file 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 f15e33c283b..74d6e12add3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs @@ -5781,6 +5781,15 @@ public virtual Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTempla return DoRequest(request); } + public virtual Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateResponse SimulateIndexTemplate(Elastic.Clients.Elasticsearch.Name name, System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor(name); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + public virtual System.Threading.Tasks.Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequest request, System.Threading.CancellationToken cancellationToken = default) { request.BeforeRequest(); @@ -5804,6 +5813,15 @@ public virtual Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTempla return DoRequestAsync(request, cancellationToken); } + public virtual System.Threading.Tasks.Task SimulateIndexTemplateAsync(Elastic.Clients.Elasticsearch.Name name, System.Action> action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.IndexManagement.SimulateIndexTemplateRequestDescriptor(name); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + public virtual Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateResponse SimulateTemplate(Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRequest request) { request.BeforeRequest(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Streams.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Streams.g.cs new file mode 100644 index 00000000000..7bf1a08a061 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Streams.g.cs @@ -0,0 +1,178 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams; + +public partial class StreamsNamespacedClient : Elastic.Clients.Elasticsearch.NamespacedClientProxy +{ + /// + /// + /// Initializes a new instance of the class for mocking. + /// + /// + protected StreamsNamespacedClient() : base() + { + } + + internal StreamsNamespacedClient(Elastic.Clients.Elasticsearch.ElasticsearchClient client) : base(client) + { + } + + public virtual Elastic.Clients.Elasticsearch.Streams.LogsDisableResponse LogsDisable(Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Streams.LogsDisableResponse LogsDisable() + { + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Streams.LogsDisableResponse LogsDisable(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task LogsDisableAsync(Elastic.Clients.Elasticsearch.Streams.LogsDisableRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task LogsDisableAsync(System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task LogsDisableAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsDisableRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual Elastic.Clients.Elasticsearch.Streams.LogsEnableResponse LogsEnable(Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Streams.LogsEnableResponse LogsEnable() + { + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Streams.LogsEnableResponse LogsEnable(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task LogsEnableAsync(Elastic.Clients.Elasticsearch.Streams.LogsEnableRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task LogsEnableAsync(System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task LogsEnableAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Streams.LogsEnableRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual Elastic.Clients.Elasticsearch.Streams.StreamsStatusResponse Status(Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Streams.StreamsStatusResponse Status() + { + var builder = new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Streams.StreamsStatusResponse Status(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task StatusAsync(Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task StatusAsync(System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task StatusAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Streams.StreamsStatusRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs index ad17753b7b8..89cb5e09f45 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -50,6 +50,7 @@ public partial class ElasticsearchClient public virtual Elastic.Clients.Elasticsearch.Snapshot.SnapshotNamespacedClient Snapshot { get; private set; } public virtual Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SnapshotLifecycleManagementNamespacedClient SnapshotLifecycleManagement { get; private set; } public virtual Elastic.Clients.Elasticsearch.Sql.SqlNamespacedClient Sql { get; private set; } + public virtual Elastic.Clients.Elasticsearch.Streams.StreamsNamespacedClient Streams { get; private set; } public virtual Elastic.Clients.Elasticsearch.Synonyms.SynonymsNamespacedClient Synonyms { get; private set; } public virtual Elastic.Clients.Elasticsearch.Tasks.TasksNamespacedClient Tasks { get; private set; } public virtual Elastic.Clients.Elasticsearch.TextStructure.TextStructureNamespacedClient TextStructure { get; private set; } @@ -83,6 +84,7 @@ private partial void SetupNamespaces() Snapshot = new Elastic.Clients.Elasticsearch.Snapshot.SnapshotNamespacedClient(this); SnapshotLifecycleManagement = new Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SnapshotLifecycleManagementNamespacedClient(this); Sql = new Elastic.Clients.Elasticsearch.Sql.SqlNamespacedClient(this); + Streams = new Elastic.Clients.Elasticsearch.Streams.StreamsNamespacedClient(this); Synonyms = new Elastic.Clients.Elasticsearch.Synonyms.SynonymsNamespacedClient(this); Tasks = new Elastic.Clients.Elasticsearch.Tasks.TasksNamespacedClient(this); TextStructure = new Elastic.Clients.Elasticsearch.TextStructure.TextStructureNamespacedClient(this); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.Converters.g.cs index 89bb1717d02..e5598f84e51 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.Converters.g.cs @@ -33,6 +33,7 @@ public sealed partial class MultisearchHeaderConverter : System.Text.Json.Serial private static readonly System.Text.Json.JsonEncodedText PropIgnoreUnavailable = System.Text.Json.JsonEncodedText.Encode("ignore_unavailable"); private static readonly System.Text.Json.JsonEncodedText PropIndices = System.Text.Json.JsonEncodedText.Encode("index"); private static readonly System.Text.Json.JsonEncodedText PropPreference = System.Text.Json.JsonEncodedText.Encode("preference"); + private static readonly System.Text.Json.JsonEncodedText PropProjectRouting = System.Text.Json.JsonEncodedText.Encode("project_routing"); private static readonly System.Text.Json.JsonEncodedText PropRequestCache = System.Text.Json.JsonEncodedText.Encode("request_cache"); private static readonly System.Text.Json.JsonEncodedText PropRouting = System.Text.Json.JsonEncodedText.Encode("routing"); private static readonly System.Text.Json.JsonEncodedText PropSearchType = System.Text.Json.JsonEncodedText.Encode("search_type"); @@ -48,6 +49,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea LocalJsonValue propIgnoreUnavailable = default; LocalJsonValue propIndices = default; LocalJsonValue propPreference = default; + LocalJsonValue propProjectRouting = default; LocalJsonValue propRequestCache = default; LocalJsonValue propRouting = default; LocalJsonValue propSearchType = default; @@ -93,6 +95,11 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea continue; } + if (propProjectRouting.TryReadProperty(ref reader, options, PropProjectRouting, null)) + { + continue; + } + if (propRequestCache.TryReadProperty(ref reader, options, PropRequestCache, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; @@ -128,6 +135,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea IgnoreUnavailable = propIgnoreUnavailable.Value, Indices = propIndices.Value, Preference = propPreference.Value, + ProjectRouting = propProjectRouting.Value, RequestCache = propRequestCache.Value, Routing = propRouting.Value, SearchType = propSearchType.Value @@ -145,6 +153,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropPreference, value.Preference, null, null); + writer.WriteProperty(options, PropProjectRouting, value.ProjectRouting, null, null); writer.WriteProperty(options, PropRequestCache, value.RequestCache, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSearchType, value.SearchType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SearchType? v) => w.WriteNullableValue(o, v)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs index 9cc6226bc6c..2b0d0469179 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs @@ -55,6 +55,7 @@ internal MultisearchHeader(Elastic.Clients.Elasticsearch.Serialization.JsonConst public bool? IgnoreUnavailable { get; set; } public Elastic.Clients.Elasticsearch.Indices? Indices { get; set; } public string? Preference { get; set; } + public string? ProjectRouting { get; set; } public bool? RequestCache { get; set; } public Elastic.Clients.Elasticsearch.Routing? Routing { get; set; } public Elastic.Clients.Elasticsearch.SearchType? SearchType { get; set; } @@ -138,6 +139,12 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor Pr return this; } + public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor ProjectRouting(string? value) + { + Instance.ProjectRouting = value; + return this; + } + public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor RequestCache(bool? value = true) { Instance.RequestCache = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.Converters.g.cs index 1fe26531cbb..ab5eb610dc3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.Converters.g.cs @@ -28,6 +28,7 @@ public sealed partial class RescoreConverter : System.Text.Json.Serialization.Js private static readonly System.Text.Json.JsonEncodedText PropWindowSize = System.Text.Json.JsonEncodedText.Encode("window_size"); private static readonly System.Text.Json.JsonEncodedText VariantLearningToRank = System.Text.Json.JsonEncodedText.Encode("learning_to_rank"); private static readonly System.Text.Json.JsonEncodedText VariantQuery = System.Text.Json.JsonEncodedText.Encode("query"); + private static readonly System.Text.Json.JsonEncodedText VariantScript = System.Text.Json.JsonEncodedText.Encode("script"); public override Elastic.Clients.Elasticsearch.Core.Search.Rescore Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { @@ -58,6 +59,14 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Rescore Read(ref Syste continue; } + if (reader.ValueTextEquals(VariantScript)) + { + variantType = VariantScript.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.Skip(); @@ -89,6 +98,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien case "query": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery)value.Variant, null, null); break; + case "script": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore)value.Variant, null, null); + break; default: throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.Core.Search.Rescore)}'."); } 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 bb2e813303c..5cce0766633 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 @@ -46,10 +46,12 @@ internal Rescore(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSent public Elastic.Clients.Elasticsearch.Core.Search.LearningToRank? LearningToRank { get => GetVariant("learning_to_rank"); set => SetVariant("learning_to_rank", value); } public Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery? Query { get => GetVariant("query"); set => SetVariant("query", value); } + public Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore? Script { get => GetVariant("script"); set => SetVariant("script", value); } public int? WindowSize { get; set; } public static implicit operator Elastic.Clients.Elasticsearch.Core.Search.Rescore(Elastic.Clients.Elasticsearch.Core.Search.LearningToRank value) => new Elastic.Clients.Elasticsearch.Core.Search.Rescore { LearningToRank = value }; public static implicit operator Elastic.Clients.Elasticsearch.Core.Search.Rescore(Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery value) => new Elastic.Clients.Elasticsearch.Core.Search.Rescore { Query = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Core.Search.Rescore(Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore value) => new Elastic.Clients.Elasticsearch.Core.Search.Rescore { Script = value }; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private T? GetVariant(string type) @@ -113,6 +115,18 @@ public Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor Qu return this; } + public Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor Script(Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore? value) + { + Instance.Script = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor Script(System.Action action) + { + Instance.Script = Elastic.Clients.Elasticsearch.Core.Search.ScriptRescoreDescriptor.Build(action); + return this; + } + public Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor WindowSize(int? value) { Instance.WindowSize = value; @@ -177,6 +191,18 @@ public Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor Query(Syst return this; } + public Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor Script(Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore? value) + { + Instance.Script = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor Script(System.Action action) + { + Instance.Script = Elastic.Clients.Elasticsearch.Core.Search.ScriptRescoreDescriptor.Build(action); + return this; + } + public Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor WindowSize(int? value) { Instance.WindowSize = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ScriptRescore.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ScriptRescore.Converters.g.cs new file mode 100644 index 00000000000..abaaf573c58 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ScriptRescore.Converters.g.cs @@ -0,0 +1,63 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search.Json; + +public sealed partial class ScriptRescoreConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropScript = System.Text.Json.JsonEncodedText.Encode("script"); + + public override Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propScript = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propScript.TryReadProperty(ref reader, options, PropScript, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Script = propScript.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropScript, value.Script, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ScriptRescore.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ScriptRescore.g.cs new file mode 100644 index 00000000000..2fe98d57630 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/ScriptRescore.g.cs @@ -0,0 +1,102 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Search; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.Json.ScriptRescoreConverter))] +public sealed partial class ScriptRescore +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ScriptRescore(Elastic.Clients.Elasticsearch.Script script) + { + Script = script; + } +#if NET7_0_OR_GREATER + public ScriptRescore() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public ScriptRescore() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal ScriptRescore(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Script Script { get; set; } +} + +public readonly partial struct ScriptRescoreDescriptor +{ + internal Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ScriptRescoreDescriptor(Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ScriptRescoreDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Core.Search.ScriptRescoreDescriptor(Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore instance) => new Elastic.Clients.Elasticsearch.Core.Search.ScriptRescoreDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore(Elastic.Clients.Elasticsearch.Core.Search.ScriptRescoreDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.Core.Search.ScriptRescoreDescriptor Script(Elastic.Clients.Elasticsearch.Script value) + { + Instance.Script = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Core.Search.ScriptRescoreDescriptor Script() + { + Instance.Script = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); + return this; + } + + public Elastic.Clients.Elasticsearch.Core.Search.ScriptRescoreDescriptor Script(System.Action? action) + { + Instance.Script = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Core.Search.ScriptRescoreDescriptor(new Elastic.Clients.Elasticsearch.Core.Search.ScriptRescore(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.Converters.g.cs index 309640403ae..6ed770cab5b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.Converters.g.cs @@ -26,6 +26,7 @@ namespace Elastic.Clients.Elasticsearch.Ingest.Json; public sealed partial class AppendProcessorConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropAllowDuplicates = System.Text.Json.JsonEncodedText.Encode("allow_duplicates"); + private static readonly System.Text.Json.JsonEncodedText PropCopyFrom = System.Text.Json.JsonEncodedText.Encode("copy_from"); private static readonly System.Text.Json.JsonEncodedText PropDescription = System.Text.Json.JsonEncodedText.Encode("description"); private static readonly System.Text.Json.JsonEncodedText PropField = System.Text.Json.JsonEncodedText.Encode("field"); private static readonly System.Text.Json.JsonEncodedText PropIf = System.Text.Json.JsonEncodedText.Encode("if"); @@ -38,13 +39,14 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propAllowDuplicates = default; + LocalJsonValue propCopyFrom = default; LocalJsonValue propDescription = default; LocalJsonValue propField = default; LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue propTag = default; - LocalJsonValue> propValue = default; + LocalJsonValue?> propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propAllowDuplicates.TryReadProperty(ref reader, options, PropAllowDuplicates, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) @@ -52,6 +54,11 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy continue; } + if (propCopyFrom.TryReadProperty(ref reader, options, PropCopyFrom, null)) + { + continue; + } + if (propDescription.TryReadProperty(ref reader, options, PropDescription, null)) { continue; @@ -82,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!)!)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!))) { continue; } @@ -100,6 +107,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy return new Elastic.Clients.Elasticsearch.Ingest.AppendProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { AllowDuplicates = propAllowDuplicates.Value, + CopyFrom = propCopyFrom.Value, Description = propDescription.Value, Field = propField.Value, If = propIf.Value, @@ -114,13 +122,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAllowDuplicates, value.AllowDuplicates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCopyFrom, value.CopyFrom, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); - writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker)))); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker)))); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs index aaf9d11cae8..c4d5e9407f9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs @@ -27,10 +27,9 @@ namespace Elastic.Clients.Elasticsearch.Ingest; public sealed partial class AppendProcessor { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public AppendProcessor(Elastic.Clients.Elasticsearch.Field field, System.Collections.Generic.ICollection value) + public AppendProcessor(Elastic.Clients.Elasticsearch.Field field) { Field = field; - Value = value; } #if NET7_0_OR_GREATER public AppendProcessor() @@ -56,6 +55,13 @@ internal AppendProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// public bool? AllowDuplicates { get; set; } + /// + /// + /// The origin field which will be appended to field, cannot set value simultaneously. + /// + /// + public Elastic.Clients.Elasticsearch.Field? CopyFrom { get; set; } + /// /// /// Description of the processor. @@ -107,14 +113,10 @@ internal AppendProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// /// - /// The value to be appended. Supports template snippets. + /// The value to be appended. Supports template snippets. May specify only one of value or copy_from. /// /// - public -#if NET7_0_OR_GREATER - required -#endif - System.Collections.Generic.ICollection Value { get; set; } + public System.Collections.Generic.ICollection? Value { get; set; } } public readonly partial struct AppendProcessorDescriptor @@ -147,6 +149,28 @@ public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor return this; } + /// + /// + /// The origin field which will be appended to field, cannot set value simultaneously. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor CopyFrom(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.CopyFrom = value; + return this; + } + + /// + /// + /// The origin field which will be appended to field, cannot set value simultaneously. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor CopyFrom(System.Linq.Expressions.Expression> value) + { + Instance.CopyFrom = value; + return this; + } + /// /// /// Description of the processor. @@ -280,10 +304,10 @@ public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor /// /// - /// The value to be appended. Supports template snippets. + /// The value to be appended. Supports template snippets. May specify only one of value or copy_from. /// /// - public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor Value(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor Value(System.Collections.Generic.ICollection? value) { Instance.Value = value; return this; @@ -291,7 +315,7 @@ public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor /// /// - /// The value to be appended. Supports template snippets. + /// The value to be appended. Supports template snippets. May specify only one of value or copy_from. /// /// public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor Value(params object[] values) @@ -339,6 +363,28 @@ public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor AllowDupli return this; } + /// + /// + /// The origin field which will be appended to field, cannot set value simultaneously. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor CopyFrom(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.CopyFrom = value; + return this; + } + + /// + /// + /// The origin field which will be appended to field, cannot set value simultaneously. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor CopyFrom(System.Linq.Expressions.Expression> value) + { + Instance.CopyFrom = value; + return this; + } + /// /// /// Description of the processor. @@ -489,10 +535,10 @@ public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor Tag(string /// /// - /// The value to be appended. Supports template snippets. + /// The value to be appended. Supports template snippets. May specify only one of value or copy_from. /// /// - public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor Value(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor Value(System.Collections.Generic.ICollection? value) { Instance.Value = value; return this; @@ -500,7 +546,7 @@ public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor Value(Syst /// /// - /// The value to be appended. Supports template snippets. + /// The value to be appended. Supports template snippets. May specify only one of value or copy_from. /// /// public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor Value(params object[] values) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FieldAccessPattern.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FieldAccessPattern.Converters.g.cs new file mode 100644 index 00000000000..e16efd8ca02 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FieldAccessPattern.Converters.g.cs @@ -0,0 +1,81 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Ingest.Json; + +public sealed partial class FieldAccessPatternConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberClassic = System.Text.Json.JsonEncodedText.Encode("classic"); + private static readonly System.Text.Json.JsonEncodedText MemberFlexible = System.Text.Json.JsonEncodedText.Encode("flexible"); + + public override Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberClassic)) + { + return Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern.Classic; + } + + if (reader.ValueTextEquals(MemberFlexible)) + { + return Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern.Flexible; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberClassic.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern.Classic; + } + + if (string.Equals(value, MemberFlexible.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern.Flexible; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern.Classic: + writer.WriteStringValue(MemberClassic); + break; + case Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern.Flexible: + writer.WriteStringValue(MemberFlexible); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FieldAccessPattern.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FieldAccessPattern.g.cs new file mode 100644 index 00000000000..cab724c0ba5 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FieldAccessPattern.g.cs @@ -0,0 +1,33 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Ingest; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Ingest.Json.FieldAccessPatternConverter))] +public enum FieldAccessPattern +{ + [System.Runtime.Serialization.EnumMember(Value = "classic")] + Classic, + [System.Runtime.Serialization.EnumMember(Value = "flexible")] + Flexible +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.Converters.g.cs index 0092801b15c..c8e3c763870 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.Converters.g.cs @@ -29,6 +29,7 @@ public sealed partial class PipelineConverter : System.Text.Json.Serialization.J private static readonly System.Text.Json.JsonEncodedText PropCreatedDateMillis = System.Text.Json.JsonEncodedText.Encode("created_date_millis"); private static readonly System.Text.Json.JsonEncodedText PropDeprecated = System.Text.Json.JsonEncodedText.Encode("deprecated"); private static readonly System.Text.Json.JsonEncodedText PropDescription = System.Text.Json.JsonEncodedText.Encode("description"); + private static readonly System.Text.Json.JsonEncodedText PropFieldAccessPattern = System.Text.Json.JsonEncodedText.Encode("field_access_pattern"); private static readonly System.Text.Json.JsonEncodedText PropMeta = System.Text.Json.JsonEncodedText.Encode("_meta"); private static readonly System.Text.Json.JsonEncodedText PropModifiedDate = System.Text.Json.JsonEncodedText.Encode("modified_date"); private static readonly System.Text.Json.JsonEncodedText PropModifiedDateMillis = System.Text.Json.JsonEncodedText.Encode("modified_date_millis"); @@ -43,6 +44,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.Pipeline Read(ref System.Te LocalJsonValue propCreatedDateMillis = default; LocalJsonValue propDeprecated = default; LocalJsonValue propDescription = default; + LocalJsonValue propFieldAccessPattern = default; LocalJsonValue?> propMeta = default; LocalJsonValue propModifiedDate = default; LocalJsonValue propModifiedDateMillis = default; @@ -71,6 +73,11 @@ public override Elastic.Clients.Elasticsearch.Ingest.Pipeline Read(ref System.Te continue; } + if (propFieldAccessPattern.TryReadProperty(ref reader, options, PropFieldAccessPattern, static Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (propMeta.TryReadProperty(ref reader, options, PropMeta, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!))) { continue; @@ -117,6 +124,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.Pipeline Read(ref System.Te CreatedDateMillis = propCreatedDateMillis.Value, Deprecated = propDeprecated.Value, Description = propDescription.Value, + FieldAccessPattern = propFieldAccessPattern.Value, Meta = propMeta.Value, ModifiedDate = propModifiedDate.Value, ModifiedDateMillis = propModifiedDateMillis.Value, @@ -133,6 +141,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCreatedDateMillis, value.CreatedDateMillis, 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, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); + writer.WriteProperty(options, PropFieldAccessPattern, value.FieldAccessPattern, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker)))); writer.WriteProperty(options, PropModifiedDate, value.ModifiedDate, 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, PropModifiedDateMillis, value.ModifiedDateMillis, 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))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs index d69ca3ed000..722e7d620f9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs @@ -71,6 +71,13 @@ internal Pipeline(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSen /// public string? Description { get; set; } + /// + /// + /// Controls how processors in this pipeline should read and write data on a document's source. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? FieldAccessPattern { get; set; } + /// /// /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. @@ -179,6 +186,17 @@ public Elastic.Clients.Elasticsearch.Ingest.PipelineDescriptor Descri return this; } + /// + /// + /// Controls how processors in this pipeline should read and write data on a document's source. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.PipelineDescriptor FieldAccessPattern(Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? value) + { + Instance.FieldAccessPattern = value; + return this; + } + /// /// /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. @@ -411,6 +429,17 @@ public Elastic.Clients.Elasticsearch.Ingest.PipelineDescriptor Description(strin return this; } + /// + /// + /// Controls how processors in this pipeline should read and write data on a document's source. + /// + /// + public Elastic.Clients.Elasticsearch.Ingest.PipelineDescriptor FieldAccessPattern(Elastic.Clients.Elasticsearch.Ingest.FieldAccessPattern? value) + { + Instance.FieldAccessPattern = value; + return this; + } + /// /// /// Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs index a86b38eab37..a0081185c6b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs @@ -71,6 +71,12 @@ internal Datafeed(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSen required #endif Elastic.Clients.Elasticsearch.MachineLearning.DelayedDataCheckConfig DelayedDataCheckConfig { get; set; } + + /// + /// + /// The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. For example: 150s. When frequency is shorter than the bucket span, interim results for the last (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value must be divisible by the interval of the date histogram aggregation. + /// + /// public Elastic.Clients.Elasticsearch.Duration? Frequency { get; set; } public System.Collections.Generic.IReadOnlyCollection? Indexes { get; set; } public diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeStatsLevel.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeStatsLevel.Converters.g.cs new file mode 100644 index 00000000000..dc273e71734 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeStatsLevel.Converters.g.cs @@ -0,0 +1,95 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Json; + +public sealed partial class NodeStatsLevelConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberIndices = System.Text.Json.JsonEncodedText.Encode("indices"); + private static readonly System.Text.Json.JsonEncodedText MemberNode = System.Text.Json.JsonEncodedText.Encode("node"); + private static readonly System.Text.Json.JsonEncodedText MemberShards = System.Text.Json.JsonEncodedText.Encode("shards"); + + public override Elastic.Clients.Elasticsearch.NodeStatsLevel Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberIndices)) + { + return Elastic.Clients.Elasticsearch.NodeStatsLevel.Indices; + } + + if (reader.ValueTextEquals(MemberNode)) + { + return Elastic.Clients.Elasticsearch.NodeStatsLevel.Node; + } + + if (reader.ValueTextEquals(MemberShards)) + { + return Elastic.Clients.Elasticsearch.NodeStatsLevel.Shards; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberIndices.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.NodeStatsLevel.Indices; + } + + if (string.Equals(value, MemberNode.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.NodeStatsLevel.Node; + } + + if (string.Equals(value, MemberShards.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.NodeStatsLevel.Shards; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.NodeStatsLevel)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.NodeStatsLevel value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.NodeStatsLevel.Indices: + writer.WriteStringValue(MemberIndices); + break; + case Elastic.Clients.Elasticsearch.NodeStatsLevel.Node: + writer.WriteStringValue(MemberNode); + break; + case Elastic.Clients.Elasticsearch.NodeStatsLevel.Shards: + writer.WriteStringValue(MemberShards); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.NodeStatsLevel)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.NodeStatsLevel ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.NodeStatsLevel value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeStatsLevel.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeStatsLevel.g.cs new file mode 100644 index 00000000000..6cd52dfaf2a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NodeStatsLevel.g.cs @@ -0,0 +1,35 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Json.NodeStatsLevelConverter))] +public enum NodeStatsLevel +{ + [System.Runtime.Serialization.EnumMember(Value = "indices")] + Indices, + [System.Runtime.Serialization.EnumMember(Value = "node")] + Node, + [System.Runtime.Serialization.EnumMember(Value = "shards")] + Shards +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyManagedBy.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyManagedBy.Converters.g.cs new file mode 100644 index 00000000000..be0236ff432 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyManagedBy.Converters.g.cs @@ -0,0 +1,81 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Security.Json; + +public sealed partial class ApiKeyManagedByConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberCloud = System.Text.Json.JsonEncodedText.Encode("cloud"); + private static readonly System.Text.Json.JsonEncodedText MemberElasticsearch = System.Text.Json.JsonEncodedText.Encode("elasticsearch"); + + public override Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberCloud)) + { + return Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy.Cloud; + } + + if (reader.ValueTextEquals(MemberElasticsearch)) + { + return Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy.Elasticsearch; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberCloud.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy.Cloud; + } + + if (string.Equals(value, MemberElasticsearch.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy.Elasticsearch; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy.Cloud: + writer.WriteStringValue(MemberCloud); + break; + case Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy.Elasticsearch: + writer.WriteStringValue(MemberElasticsearch); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyManagedBy.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyManagedBy.g.cs new file mode 100644 index 00000000000..fd4c0d80156 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyManagedBy.g.cs @@ -0,0 +1,33 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Security; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Security.Json.ApiKeyManagedByConverter))] +public enum ApiKeyManagedBy +{ + [System.Runtime.Serialization.EnumMember(Value = "cloud")] + Cloud, + [System.Runtime.Serialization.EnumMember(Value = "elasticsearch")] + Elasticsearch +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticateApiKey.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticateApiKey.Converters.g.cs index 269551b051f..15bc33fdbf3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticateApiKey.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticateApiKey.Converters.g.cs @@ -26,12 +26,16 @@ namespace Elastic.Clients.Elasticsearch.Security.Json; public sealed partial class AuthenticateApiKeyConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id"); + private static readonly System.Text.Json.JsonEncodedText PropInternal = System.Text.Json.JsonEncodedText.Encode("internal"); + private static readonly System.Text.Json.JsonEncodedText PropManagedBy = System.Text.Json.JsonEncodedText.Encode("managed_by"); private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("name"); public override Elastic.Clients.Elasticsearch.Security.AuthenticateApiKey Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propId = default; + LocalJsonValue propInternal = default; + LocalJsonValue propManagedBy = default; LocalJsonValue propName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -40,6 +44,16 @@ public override Elastic.Clients.Elasticsearch.Security.AuthenticateApiKey Read(r continue; } + if (propInternal.TryReadProperty(ref reader, options, PropInternal, null)) + { + continue; + } + + if (propManagedBy.TryReadProperty(ref reader, options, PropManagedBy, null)) + { + continue; + } + if (propName.TryReadProperty(ref reader, options, PropName, null)) { continue; @@ -58,6 +72,8 @@ public override Elastic.Clients.Elasticsearch.Security.AuthenticateApiKey Read(r return new Elastic.Clients.Elasticsearch.Security.AuthenticateApiKey(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Id = propId.Value, + Internal = propInternal.Value, + ManagedBy = propManagedBy.Value, Name = propName.Value }; } @@ -66,6 +82,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropId, value.Id, null, null); + writer.WriteProperty(options, PropInternal, value.Internal, null, null); + writer.WriteProperty(options, PropManagedBy, value.ManagedBy, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticateApiKey.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticateApiKey.g.cs index bd0f245bbcb..560adde33ac 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticateApiKey.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/AuthenticateApiKey.g.cs @@ -27,9 +27,11 @@ namespace Elastic.Clients.Elasticsearch.Security; public sealed partial class AuthenticateApiKey { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public AuthenticateApiKey(string id) + public AuthenticateApiKey(string id, bool @internal, Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy managedBy) { Id = id; + Internal = @internal; + ManagedBy = managedBy; } #if NET7_0_OR_GREATER public AuthenticateApiKey() @@ -53,5 +55,15 @@ internal AuthenticateApiKey(Elastic.Clients.Elasticsearch.Serialization.JsonCons required #endif string Id { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + bool Internal { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Security.ApiKeyManagedBy ManagedBy { get; set; } public string? Name { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Streams/LogsStatus.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Streams/LogsStatus.Converters.g.cs new file mode 100644 index 00000000000..eb067f55b63 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Streams/LogsStatus.Converters.g.cs @@ -0,0 +1,63 @@ +// 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 System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams.Json; + +public sealed partial class LogsStatusConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropEnabled = System.Text.Json.JsonEncodedText.Encode("enabled"); + + public override Elastic.Clients.Elasticsearch.Streams.LogsStatus Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propEnabled = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Streams.LogsStatus(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Enabled = propEnabled.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Streams.LogsStatus value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Streams/LogsStatus.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Streams/LogsStatus.g.cs new file mode 100644 index 00000000000..c6d0124e0c1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Streams/LogsStatus.g.cs @@ -0,0 +1,61 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Streams; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Streams.Json.LogsStatusConverter))] +public sealed partial class LogsStatus +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LogsStatus(bool enabled) + { + Enabled = enabled; + } +#if NET7_0_OR_GREATER + public LogsStatus() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public LogsStatus() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal LogsStatus(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// If true, the logs stream feature is enabled. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + bool Enabled { get; set; } +} \ No newline at end of file