From 2c99cad9e74d2199e8da50ab99a25a2f90ab75f8 Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Wed, 24 Sep 2025 11:33:15 +0000 Subject: [PATCH] Regenerate client --- .../_Generated/Api/ApiUrlLookup.g.cs | 3 + .../CreateFromRequest.Converters.g.cs | 2 +- .../IndexManagement/CreateFromRequest.g.cs | 21 +- .../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 ++++++ .../UpdateDatafeedResponse.g.cs | 26 ++- .../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 + .../Types/MachineLearning/Datafeed.g.cs | 6 + .../Types/Streams/LogsStatus.Converters.g.cs | 63 ++++++ .../_Generated/Types/Streams/LogsStatus.g.cs | 61 +++++ 27 files changed, 1688 insertions(+), 48 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/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 18d5519df7c..eadc7336262 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs @@ -445,6 +445,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/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/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/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/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 30909f303e2..1399d0fb0b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Indices.g.cs @@ -5585,6 +5585,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(); @@ -5608,6 +5617,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/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/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