diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs index 0b6de60eca4..50060fe9f52 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlLookup.g.cs @@ -293,6 +293,7 @@ internal static class ApiUrlLookup internal static ApiUrls NodesStats = new ApiUrls(new[] { "_nodes/stats", "_nodes/{node_id}/stats", "_nodes/stats/{metric}", "_nodes/{node_id}/stats/{metric}", "_nodes/stats/{metric}/{index_metric}", "_nodes/{node_id}/stats/{metric}/{index_metric}" }); internal static ApiUrls NodesUsage = new ApiUrls(new[] { "_nodes/usage", "_nodes/{node_id}/usage", "_nodes/usage/{metric}", "_nodes/{node_id}/usage/{metric}" }); internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[] { "_bulk", "{index}/_bulk" }); + internal static ApiUrls NoNamespaceCapabilities = new ApiUrls(new[] { "_capabilities" }); internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[] { "_search/scroll" }); internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "_pit" }); internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "_count", "{index}/_count" }); @@ -335,6 +336,10 @@ internal static class ApiUrlLookup internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "{index}/_update/{id}" }); internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "{index}/_update_by_query" }); internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "_update_by_query/{task_id}/_rethrottle" }); + internal static ApiUrls ProfilingFlamegraph = new ApiUrls(new[] { "_profiling/flamegraph" }); + internal static ApiUrls ProfilingStacktraces = new ApiUrls(new[] { "_profiling/stacktraces" }); + internal static ApiUrls ProfilingStatus = new ApiUrls(new[] { "_profiling/status" }); + internal static ApiUrls ProfilingTopnFunctions = new ApiUrls(new[] { "_profiling/topn/functions" }); internal static ApiUrls QueryRulesDeleteRule = new ApiUrls(new[] { "_query_rules/{ruleset_id}/_rule/{rule_id}" }); internal static ApiUrls QueryRulesDeleteRuleset = new ApiUrls(new[] { "_query_rules/{ruleset_id}" }); internal static ApiUrls QueryRulesGetRule = new ApiUrls(new[] { "_query_rules/{ruleset_id}/_rule/{rule_id}" }); @@ -476,6 +481,7 @@ internal static class ApiUrlLookup internal static ApiUrls TextStructureFindMessageStructure = new ApiUrls(new[] { "_text_structure/find_message_structure" }); internal static ApiUrls TextStructureTestGrokPattern = new ApiUrls(new[] { "_text_structure/test_grok_pattern" }); internal static ApiUrls TransformManagementDeleteTransform = new ApiUrls(new[] { "_transform/{transform_id}" }); + internal static ApiUrls TransformManagementGetNodeStats = new ApiUrls(new[] { "_transform/_node_stats" }); internal static ApiUrls TransformManagementGetTransform = new ApiUrls(new[] { "_transform/{transform_id}", "_transform" }); internal static ApiUrls TransformManagementGetTransformStats = new ApiUrls(new[] { "_transform/{transform_id}/_stats" }); internal static ApiUrls TransformManagementPreviewTransform = new ApiUrls(new[] { "_transform/{transform_id}/_preview", "_transform/_preview" }); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.Converters.g.cs new file mode 100644 index 00000000000..e3b4fe0404c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.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.Json; + +public sealed partial class CapabilitiesRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.CapabilitiesRequest 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.SafeSkip(); + 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.CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CapabilitiesRequest 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/CapabilitiesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.g.cs new file mode 100644 index 00000000000..2ed4eb6da99 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesRequest.g.cs @@ -0,0 +1,314 @@ +// 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; + +public sealed partial class CapabilitiesRequestParameters : Elastic.Transport.RequestParameters +{ + /// + /// + /// Comma-separated list of arbitrary API capabilities to check + /// + /// + public System.Collections.Generic.ICollection? Capabilities { get => Q?>("capabilities"); set => Q("capabilities", value); } + + /// + /// + /// True if only the node being called should be considered + /// + /// + public bool? LocalOnly { get => Q("local_only"); set => Q("local_only", value); } + + /// + /// + /// REST method to check + /// + /// + public Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod? Method { get => Q("method"); set => Q("method", value); } + + /// + /// + /// Comma-separated list of API parameters to check + /// + /// + public System.Collections.Generic.ICollection? Parameters { get => Q?>("parameters"); set => Q("parameters", value); } + + /// + /// + /// API path to check + /// + /// + public string? Path { get => Q("path"); set => Q("path", value); } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Checks if the specified combination of method, API, parameters, and arbitrary capabilities are supported. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Json.CapabilitiesRequestConverter))] +public sealed partial class CapabilitiesRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ +#if NET7_0_OR_GREATER + public CapabilitiesRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + public CapabilitiesRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.NoNamespaceCapabilities; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "capabilities"; + + /// + /// + /// Comma-separated list of arbitrary API capabilities to check + /// + /// + public System.Collections.Generic.ICollection? Capabilities { get => Q?>("capabilities"); set => Q("capabilities", value); } + + /// + /// + /// True if only the node being called should be considered + /// + /// + public bool? LocalOnly { get => Q("local_only"); set => Q("local_only", value); } + + /// + /// + /// REST method to check + /// + /// + public Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod? Method { get => Q("method"); set => Q("method", value); } + + /// + /// + /// Comma-separated list of API parameters to check + /// + /// + public System.Collections.Generic.ICollection? Parameters { get => Q?>("parameters"); set => Q("parameters", value); } + + /// + /// + /// API path to check + /// + /// + public string? Path { get => Q("path"); set => Q("path", value); } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Checks if the specified combination of method, API, parameters, and arbitrary capabilities are supported. +/// +/// +public readonly partial struct CapabilitiesRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.CapabilitiesRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public CapabilitiesRequestDescriptor(Elastic.Clients.Elasticsearch.CapabilitiesRequest instance) + { + Instance = instance; + } + + public CapabilitiesRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(Elastic.Clients.Elasticsearch.CapabilitiesRequest instance) => new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.CapabilitiesRequest(Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Comma-separated list of arbitrary API capabilities to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Capabilities(System.Collections.Generic.ICollection? value) + { + Instance.Capabilities = value; + return this; + } + + /// + /// + /// Comma-separated list of arbitrary API capabilities to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Capabilities(params string[] values) + { + Instance.Capabilities = [.. values]; + return this; + } + + /// + /// + /// True if only the node being called should be considered + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor LocalOnly(bool? value = true) + { + Instance.LocalOnly = value; + return this; + } + + /// + /// + /// REST method to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Method(Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod? value) + { + Instance.Method = value; + return this; + } + + /// + /// + /// Comma-separated list of API parameters to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Parameters(System.Collections.Generic.ICollection? value) + { + Instance.Parameters = value; + return this; + } + + /// + /// + /// Comma-separated list of API parameters to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Parameters(params string[] values) + { + Instance.Parameters = [.. values]; + return this; + } + + /// + /// + /// API path to check + /// + /// + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Path(string? value) + { + Instance.Path = value; + return this; + } + + /// + /// + /// 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.CapabilitiesRequestDescriptor 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.CapabilitiesRequest Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(new Elastic.Clients.Elasticsearch.CapabilitiesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor 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/CapabilitiesResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.Converters.g.cs new file mode 100644 index 00000000000..1a535f49ec1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.Converters.g.cs @@ -0,0 +1,90 @@ +// 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 CapabilitiesResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropClusterName = System.Text.Json.JsonEncodedText.Encode("cluster_name"); + private static readonly System.Text.Json.JsonEncodedText PropFailures = System.Text.Json.JsonEncodedText.Encode("failures"); + private static readonly System.Text.Json.JsonEncodedText PropNodes = System.Text.Json.JsonEncodedText.Encode("_nodes"); + private static readonly System.Text.Json.JsonEncodedText PropSupported = System.Text.Json.JsonEncodedText.Encode("supported"); + + public override Elastic.Clients.Elasticsearch.CapabilitiesResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propClusterName = default; + LocalJsonValue?> propFailures = default; + LocalJsonValue propNodes = default; + LocalJsonValue propSupported = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propClusterName.TryReadProperty(ref reader, options, PropClusterName, null)) + { + continue; + } + + if (propFailures.TryReadProperty(ref reader, options, PropFailures, static System.Collections.Generic.IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + { + continue; + } + + if (propNodes.TryReadProperty(ref reader, options, PropNodes, null)) + { + continue; + } + + if (propSupported.TryReadProperty(ref reader, options, PropSupported, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + 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.CapabilitiesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + ClusterName = propClusterName.Value, + Failures = propFailures.Value, + Nodes = propNodes.Value, + Supported = propSupported.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CapabilitiesResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropClusterName, value.ClusterName, null, null); + writer.WriteProperty(options, PropFailures, value.Failures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropNodes, value.Nodes, null, null); + writer.WriteProperty(options, PropSupported, value.Supported, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.g.cs new file mode 100644 index 00000000000..2b0083e511e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CapabilitiesResponse.g.cs @@ -0,0 +1,56 @@ +// 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.CapabilitiesResponseConverter))] +public sealed partial class CapabilitiesResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public CapabilitiesResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal CapabilitiesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +string ClusterName { get; set; } + public System.Collections.Generic.IReadOnlyCollection? Failures { get; set; } + public +#if NET7_0_OR_GREATER +required +#endif +Elastic.Clients.Elasticsearch.NodeStatistics Nodes { get; set; } + public +#if NET7_0_OR_GREATER +required +#endif +bool? Supported { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.Converters.g.cs index ac649125c04..b7dbbb277e7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.Converters.g.cs @@ -25,11 +25,19 @@ namespace Elastic.Clients.Elasticsearch.MachineLearning.Json; public sealed partial class StartDataFrameAnalyticsRequestConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText PropTimeout = System.Text.Json.JsonEncodedText.Encode("timeout"); + public override Elastic.Clients.Elasticsearch.MachineLearning.StartDataFrameAnalyticsRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { + if (propTimeout.TryReadProperty(ref reader, options, PropTimeout, null)) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.SafeSkip(); @@ -42,12 +50,14 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StartDataFrameAnal reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.MachineLearning.StartDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { + Timeout = propTimeout.Value }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.StartDataFrameAnalyticsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); + writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.g.cs index c8dbf9eba65..555bda316a7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDataFrameAnalyticsRequest.g.cs @@ -25,13 +25,6 @@ namespace Elastic.Clients.Elasticsearch.MachineLearning; public sealed partial class StartDataFrameAnalyticsRequestParameters : Elastic.Transport.RequestParameters { - /// - /// - /// Controls the amount of time to wait until the data frame analytics job - /// starts. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -74,7 +67,7 @@ internal StartDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serializat protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "ml.start_data_frame_analytics"; @@ -97,7 +90,7 @@ internal StartDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serializat /// starts. /// /// - public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + public Elastic.Clients.Elasticsearch.Duration? Timeout { get; set; } } /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.Converters.g.cs index 3c8b6fdec08..55636e38f4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.Converters.g.cs @@ -25,11 +25,33 @@ namespace Elastic.Clients.Elasticsearch.MachineLearning.Json; public sealed partial class StopDataFrameAnalyticsRequestConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText PropAllowNoMatch = System.Text.Json.JsonEncodedText.Encode("allow_no_match"); + private static readonly System.Text.Json.JsonEncodedText PropForce = System.Text.Json.JsonEncodedText.Encode("force"); + private static readonly System.Text.Json.JsonEncodedText PropTimeout = System.Text.Json.JsonEncodedText.Encode("timeout"); + public override Elastic.Clients.Elasticsearch.MachineLearning.StopDataFrameAnalyticsRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propAllowNoMatch = default; + LocalJsonValue propForce = default; + LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { + if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propForce.TryReadProperty(ref reader, options, PropForce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propTimeout.TryReadProperty(ref reader, options, PropTimeout, null)) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.SafeSkip(); @@ -42,12 +64,18 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StopDataFrameAnaly reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.MachineLearning.StopDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { + AllowNoMatch = propAllowNoMatch.Value, + Force = propForce.Value, + Timeout = propTimeout.Value }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.StopDataFrameAnalyticsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); + writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropForce, value.Force, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.g.cs index 480384ce74c..e987ae41465 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDataFrameAnalyticsRequest.g.cs @@ -25,51 +25,6 @@ namespace Elastic.Clients.Elasticsearch.MachineLearning; public sealed partial class StopDataFrameAnalyticsRequestParameters : Elastic.Transport.RequestParameters { - /// - /// - /// Specifies what to do when the request: - /// - /// - /// - /// - /// Contains wildcard expressions and there are no data frame analytics - /// jobs that match. - /// - /// - /// - /// - /// Contains the _all string or no identifiers and there are no matches. - /// - /// - /// - /// - /// Contains wildcard expressions and there are only partial matches. - /// - /// - /// - /// - /// The default value is true, which returns an empty data_frame_analytics - /// array when there are no matches and the subset of results when there are - /// partial matches. If this parameter is false, the request returns a 404 - /// status code when there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// If true, the data frame analytics job is stopped forcefully. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } - - /// - /// - /// Controls the amount of time to wait until the data frame analytics job - /// stops. Defaults to 20 seconds. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } } /// @@ -103,7 +58,7 @@ internal StopDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serializati protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "ml.stop_data_frame_analytics"; @@ -149,14 +104,14 @@ internal StopDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serializati /// status code when there are no matches or only partial matches. /// /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } + public bool? AllowNoMatch { get; set; } /// /// /// If true, the data frame analytics job is stopped forcefully. /// /// - public bool? Force { get => Q("force"); set => Q("force", value); } + public bool? Force { get; set; } /// /// @@ -164,7 +119,7 @@ internal StopDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serializati /// stops. Defaults to 20 seconds. /// /// - public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + public Elastic.Clients.Elasticsearch.Duration? Timeout { get; set; } } /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.Converters.g.cs index 194f078ff3e..0ccc74771ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.Converters.g.cs @@ -25,11 +25,33 @@ namespace Elastic.Clients.Elasticsearch.MachineLearning.Json; public sealed partial class StopTrainedModelDeploymentRequestConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText PropAllowNoMatch = System.Text.Json.JsonEncodedText.Encode("allow_no_match"); + private static readonly System.Text.Json.JsonEncodedText PropForce = System.Text.Json.JsonEncodedText.Encode("force"); + private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id"); + public override Elastic.Clients.Elasticsearch.MachineLearning.StopTrainedModelDeploymentRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propAllowNoMatch = default; + LocalJsonValue propForce = default; + LocalJsonValue propId = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { + if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propForce.TryReadProperty(ref reader, options, PropForce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propId.TryReadProperty(ref reader, options, PropId, null)) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.SafeSkip(); @@ -42,12 +64,18 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StopTrainedModelDe reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.MachineLearning.StopTrainedModelDeploymentRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { + AllowNoMatch = propAllowNoMatch.Value, + Force = propForce.Value, + Id = propId.Value }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.StopTrainedModelDeploymentRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); + writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropForce, value.Force, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteEndObject(); } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.g.cs index a899c904b41..37915da500e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopTrainedModelDeploymentRequest.g.cs @@ -25,23 +25,6 @@ namespace Elastic.Clients.Elasticsearch.MachineLearning; public sealed partial class StopTrainedModelDeploymentRequestParameters : Elastic.Transport.RequestParameters { - /// - /// - /// Specifies what to do when the request: contains wildcard expressions and there are no deployments that match; - /// contains the _all string or no identifiers and there are no matches; or contains wildcard expressions and - /// there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches. - /// If false, the request returns a 404 status code when there are no matches or only partial matches. - /// - /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } - - /// - /// - /// Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you - /// restart the model deployment. - /// - /// - public bool? Force { get => Q("force"); set => Q("force", value); } } /// @@ -71,7 +54,7 @@ internal StopTrainedModelDeploymentRequest(Elastic.Clients.Elasticsearch.Seriali protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; - internal override bool SupportsBody => false; + internal override bool SupportsBody => true; internal override string OperationName => "ml.stop_trained_model_deployment"; @@ -94,7 +77,7 @@ internal StopTrainedModelDeploymentRequest(Elastic.Clients.Elasticsearch.Seriali /// If false, the request returns a 404 status code when there are no matches or only partial matches. /// /// - public bool? AllowNoMatch { get => Q("allow_no_match"); set => Q("allow_no_match", value); } + public bool? AllowNoMatch { get; set; } /// /// @@ -102,7 +85,14 @@ internal StopTrainedModelDeploymentRequest(Elastic.Clients.Elasticsearch.Seriali /// restart the model deployment. /// /// - public bool? Force { get => Q("force"); set => Q("force", value); } + public bool? Force { get; set; } + + /// + /// + /// If provided, must be the same identifier as in the path. + /// + /// + public Elastic.Clients.Elasticsearch.Id? Id { get; set; } } /// @@ -171,6 +161,17 @@ public Elastic.Clients.Elasticsearch.MachineLearning.StopTrainedModelDeploymentR return this; } + /// + /// + /// If provided, must be the same identifier as in the path. + /// + /// + public Elastic.Clients.Elasticsearch.MachineLearning.StopTrainedModelDeploymentRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id? value) + { + Instance.Id = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.MachineLearning.StopTrainedModelDeploymentRequest Build(System.Action action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.Converters.g.cs new file mode 100644 index 00000000000..8ce9ae7bee1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.Converters.g.cs @@ -0,0 +1,37 @@ +// 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.Profiling.Json; + +public sealed partial class FlamegraphRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Conditions = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Conditions, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.g.cs new file mode 100644 index 00000000000..d73d9368e6b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphRequest.g.cs @@ -0,0 +1,153 @@ +// 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.Profiling; + +public sealed partial class FlamegraphRequestParameters : Elastic.Transport.RequestParameters +{ +} + +/// +/// +/// Returns basic information about the status of Universal Profiling. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.FlamegraphRequestConverter))] +public sealed partial class FlamegraphRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FlamegraphRequest(object conditions) + { + Conditions = conditions; + } +#if NET7_0_OR_GREATER + public FlamegraphRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The request contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public FlamegraphRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal FlamegraphRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.ProfilingFlamegraph; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "profiling.flamegraph"; + + public +#if NET7_0_OR_GREATER + required +#endif + object Conditions { get; set; } +} + +/// +/// +/// Returns basic information about the status of Universal Profiling. +/// +/// +public readonly partial struct FlamegraphRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FlamegraphRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest instance) + { + Instance = instance; + } + + public FlamegraphRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest instance) => new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor Conditions(object value) + { + Instance.Conditions = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor 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/Profiling/FlamegraphResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.Converters.g.cs new file mode 100644 index 00000000000..4d00eee5bef --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.Converters.g.cs @@ -0,0 +1,37 @@ +// 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.Profiling.Json; + +public sealed partial class FlamegraphResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Flamegraph = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Flamegraph, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.g.cs new file mode 100644 index 00000000000..8c78b33e698 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/FlamegraphResponse.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.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.FlamegraphResponseConverter))] +public sealed partial class FlamegraphResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FlamegraphResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal FlamegraphResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +object Flamegraph { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.Converters.g.cs new file mode 100644 index 00000000000..ed02c355788 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.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.Profiling.Json; + +public sealed partial class ProfilingStatusRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest 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.SafeSkip(); + 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.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest 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/Profiling/ProfilingStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.g.cs new file mode 100644 index 00000000000..45b01e7af7c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusRequest.g.cs @@ -0,0 +1,220 @@ +// 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.Profiling; + +public sealed partial class ProfilingStatusRequestParameters : 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.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + /// + /// + /// Whether to return immediately or wait until resources have been created + /// + /// + public bool? WaitForResourcesCreated { get => Q("wait_for_resources_created"); set => Q("wait_for_resources_created", value); } +} + +/// +/// +/// Returns basic information about the status of Universal Profiling. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.ProfilingStatusRequestConverter))] +public sealed partial class ProfilingStatusRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ +#if NET7_0_OR_GREATER + public ProfilingStatusRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + public ProfilingStatusRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.ProfilingStatus; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "profiling.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.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + + /// + /// + /// Period to wait for a response. + /// If no response is received before the timeout expires, the request fails and returns an error. + /// + /// + public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + /// + /// + /// Whether to return immediately or wait until resources have been created + /// + /// + public bool? WaitForResourcesCreated { get => Q("wait_for_resources_created"); set => Q("wait_for_resources_created", value); } +} + +/// +/// +/// Returns basic information about the status of Universal Profiling. +/// +/// +public readonly partial struct ProfilingStatusRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ProfilingStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest instance) + { + Instance = instance; + } + + public ProfilingStatusRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest instance) => new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor 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.Profiling.ProfilingStatusRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.MasterTimeout = value; + return this; + } + + /// + /// + /// 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.Profiling.ProfilingStatusRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.Timeout = value; + return this; + } + + /// + /// + /// Whether to return immediately or wait until resources have been created + /// + /// + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor WaitForResourcesCreated(bool? value = true) + { + Instance.WaitForResourcesCreated = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor 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/Profiling/ProfilingStatusResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.Converters.g.cs new file mode 100644 index 00000000000..e370a4c477d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.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.Profiling.Json; + +public sealed partial class ProfilingStatusResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropOperationMode = System.Text.Json.JsonEncodedText.Encode("operation_mode"); + + public override Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propOperationMode = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propOperationMode.TryReadProperty(ref reader, options, PropOperationMode, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + 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.Profiling.ProfilingStatusResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + OperationMode = propOperationMode.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropOperationMode, value.OperationMode, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.g.cs new file mode 100644 index 00000000000..bde88a214a8 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/ProfilingStatusResponse.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.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.ProfilingStatusResponseConverter))] +public sealed partial class ProfilingStatusResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ProfilingStatusResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal ProfilingStatusResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode OperationMode { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.Converters.g.cs new file mode 100644 index 00000000000..c473a380c36 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.Converters.g.cs @@ -0,0 +1,37 @@ +// 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.Profiling.Json; + +public sealed partial class StacktracesRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Conditions = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Conditions, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.g.cs new file mode 100644 index 00000000000..37d255763db --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesRequest.g.cs @@ -0,0 +1,153 @@ +// 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.Profiling; + +public sealed partial class StacktracesRequestParameters : Elastic.Transport.RequestParameters +{ +} + +/// +/// +/// Extracts raw stacktrace information from Universal Profiling. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.StacktracesRequestConverter))] +public sealed partial class StacktracesRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public StacktracesRequest(object conditions) + { + Conditions = conditions; + } +#if NET7_0_OR_GREATER + public StacktracesRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The request contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public StacktracesRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal StacktracesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.ProfilingStacktraces; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "profiling.stacktraces"; + + public +#if NET7_0_OR_GREATER + required +#endif + object Conditions { get; set; } +} + +/// +/// +/// Extracts raw stacktrace information from Universal Profiling. +/// +/// +public readonly partial struct StacktracesRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public StacktracesRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest instance) + { + Instance = instance; + } + + public StacktracesRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest instance) => new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor Conditions(object value) + { + Instance.Conditions = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor 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/Profiling/StacktracesResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.Converters.g.cs new file mode 100644 index 00000000000..66264049afb --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.Converters.g.cs @@ -0,0 +1,37 @@ +// 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.Profiling.Json; + +public sealed partial class StacktracesResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Flamegraph = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Flamegraph, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.g.cs new file mode 100644 index 00000000000..e97b8fa6eb5 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/StacktracesResponse.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.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.StacktracesResponseConverter))] +public sealed partial class StacktracesResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public StacktracesResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal StacktracesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +object Flamegraph { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.Converters.g.cs new file mode 100644 index 00000000000..a9929503038 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.Converters.g.cs @@ -0,0 +1,37 @@ +// 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.Profiling.Json; + +public sealed partial class TopnFunctionsRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Conditions = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Conditions, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.g.cs new file mode 100644 index 00000000000..244701b702b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsRequest.g.cs @@ -0,0 +1,153 @@ +// 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.Profiling; + +public sealed partial class TopnFunctionsRequestParameters : Elastic.Transport.RequestParameters +{ +} + +/// +/// +/// Extracts a list of topN functions from Universal Profiling. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.TopnFunctionsRequestConverter))] +public sealed partial class TopnFunctionsRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TopnFunctionsRequest(object conditions) + { + Conditions = conditions; + } +#if NET7_0_OR_GREATER + public TopnFunctionsRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The request contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public TopnFunctionsRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.ProfilingTopnFunctions; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "profiling.topn_functions"; + + public +#if NET7_0_OR_GREATER + required +#endif + object Conditions { get; set; } +} + +/// +/// +/// Extracts a list of topN functions from Universal Profiling. +/// +/// +public readonly partial struct TopnFunctionsRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TopnFunctionsRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest instance) + { + Instance = instance; + } + + public TopnFunctionsRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest instance) => new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor Conditions(object value) + { + Instance.Conditions = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor 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/Profiling/TopnFunctionsResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.Converters.g.cs new file mode 100644 index 00000000000..db63300f19e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.Converters.g.cs @@ -0,0 +1,37 @@ +// 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.Profiling.Json; + +public sealed partial class TopnFunctionsResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Body = reader.ReadValue(options, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteValue(options, value.Body, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, object v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.g.cs new file mode 100644 index 00000000000..a2d69c1f7c7 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Profiling/TopnFunctionsResponse.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.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.TopnFunctionsResponseConverter))] +public sealed partial class TopnFunctionsResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TopnFunctionsResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal TopnFunctionsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER +required +#endif +object Body { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsRequest.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsRequest.Converters.g.cs new file mode 100644 index 00000000000..533b373b1dd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsRequest.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.TransformManagement.Json; + +public sealed partial class GetNodeStatsRequestConverter : System.Text.Json.Serialization.JsonConverter +{ + public override Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest 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.SafeSkip(); + 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.TransformManagement.GetNodeStatsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest 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/TransformManagement/GetNodeStatsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsRequest.g.cs new file mode 100644 index 00000000000..27a984c8aca --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsRequest.g.cs @@ -0,0 +1,146 @@ +// 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.TransformManagement; + +public sealed partial class GetNodeStatsRequestParameters : Elastic.Transport.RequestParameters +{ +} + +/// +/// +/// Get node stats. +/// +/// +/// Get per-node information about transform usage. +/// +/// +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.TransformManagement.Json.GetNodeStatsRequestConverter))] +public sealed partial class GetNodeStatsRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest +{ +#if NET7_0_OR_GREATER + public GetNodeStatsRequest() + { + } +#endif +#if !NET7_0_OR_GREATER + public GetNodeStatsRequest() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal GetNodeStatsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + internal override Elastic.Clients.Elasticsearch.Requests.ApiUrls ApiUrls => Elastic.Clients.Elasticsearch.Requests.ApiUrlLookup.TransformManagementGetNodeStats; + + protected override Elastic.Transport.HttpMethod StaticHttpMethod => Elastic.Transport.HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "transform.get_node_stats"; +} + +/// +/// +/// Get node stats. +/// +/// +/// Get per-node information about transform usage. +/// +/// +public readonly partial struct GetNodeStatsRequestDescriptor +{ + internal Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public GetNodeStatsRequestDescriptor(Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest instance) + { + Instance = instance; + } + + public GetNodeStatsRequestDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor(Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest instance) => new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest(Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor descriptor) => descriptor.Instance; + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor(new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor ErrorTrace(bool? value) + { + Instance.ErrorTrace = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor FilterPath(params string[]? value) + { + Instance.FilterPath = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor Human(bool? value) + { + Instance.Human = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor Pretty(bool? value) + { + Instance.Pretty = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor SourceQueryString(string? value) + { + Instance.SourceQueryString = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) + { + Instance.RequestConfiguration = value; + return this; + } + + public Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor 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/TransformManagement/GetNodeStatsResponse.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsResponse.Converters.g.cs new file mode 100644 index 00000000000..f3d3e9e0508 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsResponse.Converters.g.cs @@ -0,0 +1,69 @@ +// 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.TransformManagement.Json; + +public sealed partial class GetNodeStatsResponseConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropTotal = System.Text.Json.JsonEncodedText.Encode("total"); + + public override Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + System.Collections.Generic.Dictionary? propNodes = default; + LocalJsonValue propTotal = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + { + continue; + } + + propNodes ??= new System.Collections.Generic.Dictionary(); + reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.TransformManagement.Scheduler value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, null); + propNodes[key] = value; + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Nodes = propNodes, + Total = propTotal.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsResponse value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropTotal, value.Total, null, null); + if (value.Nodes is not null) + { + foreach (var item in value.Nodes) + { + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); + } + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsResponse.g.cs new file mode 100644 index 00000000000..072ce8c88cd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TransformManagement/GetNodeStatsResponse.g.cs @@ -0,0 +1,51 @@ +// 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.TransformManagement; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.TransformManagement.Json.GetNodeStatsResponseConverter))] +public sealed partial class GetNodeStatsResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public GetNodeStatsResponse() + { + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal GetNodeStatsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Per node statistics + /// + /// + public System.Collections.Generic.IReadOnlyDictionary? Nodes { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.TransformManagement.Scheduler Total { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Profiling.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Profiling.g.cs new file mode 100644 index 00000000000..1a31c837723 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Profiling.g.cs @@ -0,0 +1,176 @@ +// 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.Profiling; + +public partial class ProfilingNamespacedClient : Elastic.Clients.Elasticsearch.NamespacedClientProxy +{ + /// + /// + /// Initializes a new instance of the class for mocking. + /// + /// + protected ProfilingNamespacedClient() : base() + { + } + + internal ProfilingNamespacedClient(Elastic.Clients.Elasticsearch.ElasticsearchClient client) : base(client) + { + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse Flamegraph(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.FlamegraphResponse Flamegraph(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task FlamegraphAsync(Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task FlamegraphAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.FlamegraphRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse Stacktraces(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.StacktracesResponse Stacktraces(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task StacktracesAsync(Elastic.Clients.Elasticsearch.Profiling.StacktracesRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task StacktracesAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.StacktracesRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse Status(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse Status() + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusResponse Status(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task StatusAsync(Elastic.Clients.Elasticsearch.Profiling.ProfilingStatusRequest 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.Profiling.ProfilingStatusRequestDescriptor(); + 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.Profiling.ProfilingStatusRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse TopnFunctions(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsResponse TopnFunctions(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task TopnFunctionsAsync(Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task TopnFunctionsAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.Profiling.TopnFunctionsRequestDescriptor(); + 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.Transform.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Transform.g.cs index d9f6dbc4821..9dbab24b367 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Transform.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Transform.g.cs @@ -84,6 +84,52 @@ public virtual Elastic.Clients.Elasticsearch.TransformManagement.DeleteTransform return DoRequestAsync(request, cancellationToken); } + public virtual Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsResponse GetNodeStats(Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsResponse GetNodeStats() + { + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsResponse GetNodeStats(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task GetNodeStatsAsync(Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task GetNodeStatsAsync(System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task GetNodeStatsAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.TransformManagement.GetNodeStatsRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + public virtual Elastic.Clients.Elasticsearch.TransformManagement.GetTransformResponse GetTransform(Elastic.Clients.Elasticsearch.TransformManagement.GetTransformRequest request) { request.BeforeRequest(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs index e6ae08de7af..d039ecdf485 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -41,6 +41,7 @@ public partial class ElasticsearchClient public virtual Elastic.Clients.Elasticsearch.LicenseManagement.LicenseManagementNamespacedClient LicenseManagement { get; private set; } public virtual Elastic.Clients.Elasticsearch.MachineLearning.MachineLearningNamespacedClient MachineLearning { get; private set; } public virtual Elastic.Clients.Elasticsearch.Nodes.NodesNamespacedClient Nodes { get; private set; } + public virtual Elastic.Clients.Elasticsearch.Profiling.ProfilingNamespacedClient Profiling { get; private set; } public virtual Elastic.Clients.Elasticsearch.QueryRules.QueryRulesNamespacedClient QueryRules { get; private set; } public virtual Elastic.Clients.Elasticsearch.Rollup.RollupNamespacedClient Rollup { get; private set; } public virtual Elastic.Clients.Elasticsearch.SearchableSnapshots.SearchableSnapshotsNamespacedClient SearchableSnapshots { get; private set; } @@ -75,6 +76,7 @@ private partial void SetupNamespaces() LicenseManagement = new Elastic.Clients.Elasticsearch.LicenseManagement.LicenseManagementNamespacedClient(this); MachineLearning = new Elastic.Clients.Elasticsearch.MachineLearning.MachineLearningNamespacedClient(this); Nodes = new Elastic.Clients.Elasticsearch.Nodes.NodesNamespacedClient(this); + Profiling = new Elastic.Clients.Elasticsearch.Profiling.ProfilingNamespacedClient(this); QueryRules = new Elastic.Clients.Elasticsearch.QueryRules.QueryRulesNamespacedClient(this); Rollup = new Elastic.Clients.Elasticsearch.Rollup.RollupNamespacedClient(this); SearchableSnapshots = new Elastic.Clients.Elasticsearch.SearchableSnapshots.SearchableSnapshotsNamespacedClient(this); @@ -224,6 +226,52 @@ public virtual Elastic.Clients.Elasticsearch.BulkResponse Bulk(Elasti return DoRequestAsync(request, cancellationToken); } + public virtual Elastic.Clients.Elasticsearch.CapabilitiesResponse Capabilities(Elastic.Clients.Elasticsearch.CapabilitiesRequest request) + { + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.CapabilitiesResponse Capabilities() + { + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.CapabilitiesResponse Capabilities(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual System.Threading.Tasks.Task CapabilitiesAsync(Elastic.Clients.Elasticsearch.CapabilitiesRequest request, System.Threading.CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task CapabilitiesAsync(System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task CapabilitiesAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.CapabilitiesRequestDescriptor(); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + public virtual Elastic.Clients.Elasticsearch.ClearScrollResponse ClearScroll(Elastic.Clients.Elasticsearch.ClearScrollRequest request) { request.BeforeRequest(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.Converters.g.cs index a7245c88b62..01ebe7cf8e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.Converters.g.cs @@ -26,6 +26,10 @@ namespace Elastic.Clients.Elasticsearch.Cluster.Json; public sealed partial class DenseVectorOffHeapStatsConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropFielddata = System.Text.Json.JsonEncodedText.Encode("fielddata"); + private static readonly System.Text.Json.JsonEncodedText PropTotalCenifSize = System.Text.Json.JsonEncodedText.Encode("total_cenif_size"); + private static readonly System.Text.Json.JsonEncodedText PropTotalCenifSizeBytes = System.Text.Json.JsonEncodedText.Encode("total_cenif_size_bytes"); + private static readonly System.Text.Json.JsonEncodedText PropTotalClivfSize = System.Text.Json.JsonEncodedText.Encode("total_clivf_size"); + private static readonly System.Text.Json.JsonEncodedText PropTotalClivfSizeBytes = System.Text.Json.JsonEncodedText.Encode("total_clivf_size_bytes"); private static readonly System.Text.Json.JsonEncodedText PropTotalSize = System.Text.Json.JsonEncodedText.Encode("total_size"); private static readonly System.Text.Json.JsonEncodedText PropTotalSizeBytes = System.Text.Json.JsonEncodedText.Encode("total_size_bytes"); private static readonly System.Text.Json.JsonEncodedText PropTotalVebSize = System.Text.Json.JsonEncodedText.Encode("total_veb_size"); @@ -41,6 +45,10 @@ public override Elastic.Clients.Elasticsearch.Cluster.DenseVectorOffHeapStats Re { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue>?> propFielddata = default; + LocalJsonValue propTotalCenifSize = default; + LocalJsonValue propTotalCenifSizeBytes = default; + LocalJsonValue propTotalClivfSize = default; + LocalJsonValue propTotalClivfSizeBytes = default; LocalJsonValue propTotalSize = default; LocalJsonValue propTotalSizeBytes = default; LocalJsonValue propTotalVebSize = default; @@ -58,6 +66,26 @@ public override Elastic.Clients.Elasticsearch.Cluster.DenseVectorOffHeapStats Re continue; } + if (propTotalCenifSize.TryReadProperty(ref reader, options, PropTotalCenifSize, null)) + { + continue; + } + + if (propTotalCenifSizeBytes.TryReadProperty(ref reader, options, PropTotalCenifSizeBytes, null)) + { + continue; + } + + if (propTotalClivfSize.TryReadProperty(ref reader, options, PropTotalClivfSize, null)) + { + continue; + } + + if (propTotalClivfSizeBytes.TryReadProperty(ref reader, options, PropTotalClivfSizeBytes, null)) + { + continue; + } + if (propTotalSize.TryReadProperty(ref reader, options, PropTotalSize, null)) { continue; @@ -121,6 +149,10 @@ public override Elastic.Clients.Elasticsearch.Cluster.DenseVectorOffHeapStats Re return new Elastic.Clients.Elasticsearch.Cluster.DenseVectorOffHeapStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Fielddata = propFielddata.Value, + TotalCenifSize = propTotalCenifSize.Value, + TotalCenifSizeBytes = propTotalCenifSizeBytes.Value, + TotalClivfSize = propTotalClivfSize.Value, + TotalClivfSizeBytes = propTotalClivfSizeBytes.Value, TotalSize = propTotalSize.Value, TotalSizeBytes = propTotalSizeBytes.Value, TotalVebSize = propTotalVebSize.Value, @@ -138,6 +170,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFielddata, value.Fielddata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); + writer.WriteProperty(options, PropTotalCenifSize, value.TotalCenifSize, null, null); + writer.WriteProperty(options, PropTotalCenifSizeBytes, value.TotalCenifSizeBytes, null, null); + writer.WriteProperty(options, PropTotalClivfSize, value.TotalClivfSize, null, null); + writer.WriteProperty(options, PropTotalClivfSizeBytes, value.TotalClivfSizeBytes, null, null); writer.WriteProperty(options, PropTotalSize, value.TotalSize, null, null); writer.WriteProperty(options, PropTotalSizeBytes, value.TotalSizeBytes, null, null); writer.WriteProperty(options, PropTotalVebSize, value.TotalVebSize, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.g.cs index 794a0a93aba..324e1cf0050 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/DenseVectorOffHeapStats.g.cs @@ -27,8 +27,10 @@ namespace Elastic.Clients.Elasticsearch.Cluster; public sealed partial class DenseVectorOffHeapStats { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public DenseVectorOffHeapStats(long totalSizeBytes, long totalVebSizeBytes, long totalVecSizeBytes, long totalVeqSizeBytes, long totalVexSizeBytes) + public DenseVectorOffHeapStats(long totalCenifSizeBytes, long totalClivfSizeBytes, long totalSizeBytes, long totalVebSizeBytes, long totalVecSizeBytes, long totalVeqSizeBytes, long totalVexSizeBytes) { + TotalCenifSizeBytes = totalCenifSizeBytes; + TotalClivfSizeBytes = totalClivfSizeBytes; TotalSizeBytes = totalSizeBytes; TotalVebSizeBytes = totalVebSizeBytes; TotalVecSizeBytes = totalVecSizeBytes; @@ -53,6 +55,18 @@ internal DenseVectorOffHeapStats(Elastic.Clients.Elasticsearch.Serialization.Jso } public System.Collections.Generic.IReadOnlyDictionary>? Fielddata { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? TotalCenifSize { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long TotalCenifSizeBytes { get; set; } + public Elastic.Clients.Elasticsearch.ByteSize? TotalClivfSize { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long TotalClivfSizeBytes { get; set; } public Elastic.Clients.Elasticsearch.ByteSize? TotalSize { get; set; } public #if NET7_0_OR_GREATER diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.Converters.g.cs new file mode 100644 index 00000000000..72cffa95226 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.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.Capabilities.Json; + +public sealed partial class FailedNodeExceptionConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropNodeId = System.Text.Json.JsonEncodedText.Encode("node_id"); + + public override Elastic.Clients.Elasticsearch.Core.Capabilities.FailedNodeException Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propNodeId = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propNodeId.TryReadProperty(ref reader, options, PropNodeId, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + 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.Capabilities.FailedNodeException(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + NodeId = propNodeId.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Capabilities.FailedNodeException value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropNodeId, value.NodeId, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.g.cs new file mode 100644 index 00000000000..01e0cb8c663 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/FailedNodeException.g.cs @@ -0,0 +1,56 @@ +// 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.Capabilities; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.Capabilities.Json.FailedNodeExceptionConverter))] +public sealed partial class FailedNodeException +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FailedNodeException(string nodeId) + { + NodeId = nodeId; + } +#if NET7_0_OR_GREATER + public FailedNodeException() + { + } +#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 FailedNodeException() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal FailedNodeException(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + string NodeId { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.Converters.g.cs new file mode 100644 index 00000000000..3db65735b3f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.Converters.g.cs @@ -0,0 +1,123 @@ +// 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.Capabilities.Json; + +public sealed partial class RestMethodConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberDelete = System.Text.Json.JsonEncodedText.Encode("DELETE"); + private static readonly System.Text.Json.JsonEncodedText MemberGet = System.Text.Json.JsonEncodedText.Encode("GET"); + private static readonly System.Text.Json.JsonEncodedText MemberHead = System.Text.Json.JsonEncodedText.Encode("HEAD"); + private static readonly System.Text.Json.JsonEncodedText MemberPost = System.Text.Json.JsonEncodedText.Encode("POST"); + private static readonly System.Text.Json.JsonEncodedText MemberPut = System.Text.Json.JsonEncodedText.Encode("PUT"); + + public override Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberDelete)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Delete; + } + + if (reader.ValueTextEquals(MemberGet)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Get; + } + + if (reader.ValueTextEquals(MemberHead)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Head; + } + + if (reader.ValueTextEquals(MemberPost)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Post; + } + + if (reader.ValueTextEquals(MemberPut)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Put; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberDelete.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Delete; + } + + if (string.Equals(value, MemberGet.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Get; + } + + if (string.Equals(value, MemberHead.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Head; + } + + if (string.Equals(value, MemberPost.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Post; + } + + if (string.Equals(value, MemberPut.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Put; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Delete: + writer.WriteStringValue(MemberDelete); + break; + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Get: + writer.WriteStringValue(MemberGet); + break; + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Head: + writer.WriteStringValue(MemberHead); + break; + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Post: + writer.WriteStringValue(MemberPost); + break; + case Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod.Put: + writer.WriteStringValue(MemberPut); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Core.Capabilities.RestMethod 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.Core.Capabilities.RestMethod 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/Core/Capabilities/RestMethod.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.g.cs new file mode 100644 index 00000000000..96ed621e551 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Capabilities/RestMethod.g.cs @@ -0,0 +1,39 @@ +// 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.Capabilities; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.Capabilities.Json.RestMethodConverter))] +public enum RestMethod +{ + [System.Runtime.Serialization.EnumMember(Value = "DELETE")] + Delete, + [System.Runtime.Serialization.EnumMember(Value = "GET")] + Get, + [System.Runtime.Serialization.EnumMember(Value = "HEAD")] + Head, + [System.Runtime.Serialization.EnumMember(Value = "POST")] + Post, + [System.Runtime.Serialization.EnumMember(Value = "PUT")] + Put +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorElementType.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorElementType.Converters.g.cs index 7f6ea5c7877..9c658f1004c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorElementType.Converters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorElementType.Converters.g.cs @@ -25,12 +25,18 @@ namespace Elastic.Clients.Elasticsearch.Mapping.Json; public sealed partial class DenseVectorElementTypeConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText MemberBfloat16 = System.Text.Json.JsonEncodedText.Encode("bfloat16"); private static readonly System.Text.Json.JsonEncodedText MemberBit = System.Text.Json.JsonEncodedText.Encode("bit"); private static readonly System.Text.Json.JsonEncodedText MemberByte = System.Text.Json.JsonEncodedText.Encode("byte"); private static readonly System.Text.Json.JsonEncodedText MemberFloat = System.Text.Json.JsonEncodedText.Encode("float"); public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { + if (reader.ValueTextEquals(MemberBfloat16)) + { + return Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType.Bfloat16; + } + if (reader.ValueTextEquals(MemberBit)) { return Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType.Bit; @@ -47,6 +53,11 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType Rea } var value = reader.GetString()!; + if (string.Equals(value, MemberBfloat16.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType.Bfloat16; + } + if (string.Equals(value, MemberBit.Value, System.StringComparison.OrdinalIgnoreCase)) { return Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType.Bit; @@ -69,6 +80,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { switch (value) { + case Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType.Bfloat16: + writer.WriteStringValue(MemberBfloat16); + break; case Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType.Bit: writer.WriteStringValue(MemberBit); break; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorElementType.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorElementType.g.cs index bb1e2c7beef..1d7d184eb70 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorElementType.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorElementType.g.cs @@ -26,6 +26,13 @@ namespace Elastic.Clients.Elasticsearch.Mapping; [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Mapping.Json.DenseVectorElementTypeConverter))] public enum DenseVectorElementType { + /// + /// + /// Indexes a 2-byte floating-point value per dimension. + /// + /// + [System.Runtime.Serialization.EnumMember(Value = "bfloat16")] + Bfloat16, /// /// /// Indexes a single bit per dimension. Useful for very high-dimensional vectors or models that specifically support diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs index c58287c8e18..8b12e8d95a1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs @@ -93,7 +93,7 @@ internal DenseVectorIndexOptions(Elastic.Clients.Elasticsearch.Serialization.Jso /// true if vector rescoring should be done on-disk /// /// - /// Only applicable to bbq_hnsw + /// Only applicable to bbq_disk, bbq_hnsw, int4_hnsw, int8_hnsw /// /// public bool? OnDiskRescore { get; set; } @@ -193,7 +193,7 @@ public Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptionsDescriptor M /// true if vector rescoring should be done on-disk /// /// - /// Only applicable to bbq_hnsw + /// Only applicable to bbq_disk, bbq_hnsw, int4_hnsw, int8_hnsw /// /// public Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptionsDescriptor OnDiskRescore(bool? value = true) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.Converters.g.cs new file mode 100644 index 00000000000..512e8f08032 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.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.Profiling.Json; + +public sealed partial class ProfilingOperationModeConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberRunning = System.Text.Json.JsonEncodedText.Encode("RUNNING"); + private static readonly System.Text.Json.JsonEncodedText MemberStopped = System.Text.Json.JsonEncodedText.Encode("STOPPED"); + private static readonly System.Text.Json.JsonEncodedText MemberStopping = System.Text.Json.JsonEncodedText.Encode("STOPPING"); + + public override Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberRunning)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Running; + } + + if (reader.ValueTextEquals(MemberStopped)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopped; + } + + if (reader.ValueTextEquals(MemberStopping)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopping; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberRunning.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Running; + } + + if (string.Equals(value, MemberStopped.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopped; + } + + if (string.Equals(value, MemberStopping.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopping; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Running: + writer.WriteStringValue(MemberRunning); + break; + case Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopped: + writer.WriteStringValue(MemberStopped); + break; + case Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode.Stopping: + writer.WriteStringValue(MemberStopping); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Profiling.ProfilingOperationMode 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.Profiling.ProfilingOperationMode 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/Profiling/ProfilingOperationMode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.g.cs new file mode 100644 index 00000000000..5be6774c4d0 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profiling/ProfilingOperationMode.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.Profiling; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Profiling.Json.ProfilingOperationModeConverter))] +public enum ProfilingOperationMode +{ + [System.Runtime.Serialization.EnumMember(Value = "RUNNING")] + Running, + [System.Runtime.Serialization.EnumMember(Value = "STOPPED")] + Stopped, + [System.Runtime.Serialization.EnumMember(Value = "STOPPING")] + Stopping +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Scheduler.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Scheduler.Converters.g.cs new file mode 100644 index 00000000000..68a58743d29 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Scheduler.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.TransformManagement.Json; + +public sealed partial class SchedulerConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropScheduler = System.Text.Json.JsonEncodedText.Encode("scheduler"); + + public override Elastic.Clients.Elasticsearch.TransformManagement.Scheduler Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propScheduler = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propScheduler.TryReadProperty(ref reader, options, PropScheduler, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + 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.TransformManagement.Scheduler(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Scheduler = propScheduler.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.Scheduler value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropScheduler, value.Scheduler, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Scheduler.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Scheduler.g.cs new file mode 100644 index 00000000000..b42c0e29072 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Scheduler.g.cs @@ -0,0 +1,56 @@ +// 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.TransformManagement; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.TransformManagement.Json.SchedulerConverter))] +public sealed partial class Scheduler +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public Scheduler(Elastic.Clients.Elasticsearch.TransformManagement.TransformNodeStatsDetails scheduler) + { + Scheduler = scheduler; + } +#if NET7_0_OR_GREATER + public Scheduler() + { + } +#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 Scheduler() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal Scheduler(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.TransformManagement.TransformNodeStatsDetails Scheduler { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformNodeStatsDetails.Converters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformNodeStatsDetails.Converters.g.cs new file mode 100644 index 00000000000..9633d4bff78 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformNodeStatsDetails.Converters.g.cs @@ -0,0 +1,72 @@ +// 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.TransformManagement.Json; + +public sealed partial class TransformNodeStatsDetailsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropPeekTransform = System.Text.Json.JsonEncodedText.Encode("peek_transform"); + private static readonly System.Text.Json.JsonEncodedText PropRegisteredTransformCount = System.Text.Json.JsonEncodedText.Encode("registered_transform_count"); + + public override Elastic.Clients.Elasticsearch.TransformManagement.TransformNodeStatsDetails Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propPeekTransform = default; + LocalJsonValue propRegisteredTransformCount = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propPeekTransform.TryReadProperty(ref reader, options, PropPeekTransform, null)) + { + continue; + } + + if (propRegisteredTransformCount.TryReadProperty(ref reader, options, PropRegisteredTransformCount, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.SafeSkip(); + 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.TransformManagement.TransformNodeStatsDetails(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + PeekTransform = propPeekTransform.Value, + RegisteredTransformCount = propRegisteredTransformCount.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.TransformNodeStatsDetails value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropPeekTransform, value.PeekTransform, null, null); + writer.WriteProperty(options, PropRegisteredTransformCount, value.RegisteredTransformCount, null, null); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformNodeStatsDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformNodeStatsDetails.g.cs new file mode 100644 index 00000000000..eeb8b63a6d6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformNodeStatsDetails.g.cs @@ -0,0 +1,57 @@ +// 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.TransformManagement; + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.TransformManagement.Json.TransformNodeStatsDetailsConverter))] +public sealed partial class TransformNodeStatsDetails +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public TransformNodeStatsDetails(int registeredTransformCount) + { + RegisteredTransformCount = registeredTransformCount; + } +#if NET7_0_OR_GREATER + public TransformNodeStatsDetails() + { + } +#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 TransformNodeStatsDetails() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal TransformNodeStatsDetails(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public string? PeekTransform { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int RegisteredTransformCount { get; set; } +} \ No newline at end of file